Skip to content

Commit

Permalink
Port changes made in PR go-gorm#652
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Jan 5, 2016
1 parent e60acad commit 3a93676
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 71 deletions.
5 changes: 5 additions & 0 deletions create_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gorm_test

import (
"os"
"reflect"
"testing"
"time"
Expand Down Expand Up @@ -57,6 +58,10 @@ func TestCreate(t *testing.T) {
}

func TestCreateWithNoGORMPrimayKey(t *testing.T) {
if dialect := os.Getenv("GORM_DIALECT"); dialect == "mssql" {
t.Skip("Skipping this because MSSQL will return identity only if the table has an Id column")
}

jt := JoinTable{From: 1, To: 2}
err := DB.Create(&jt).Error
if err != nil {
Expand Down
Loading

0 comments on commit 3a93676

Please sign in to comment.