Fix TestPostgresReturningMultipleColumns error
This commit is contained in:
parent
656b6e22e4
commit
48c265249c
@ -1,12 +1,11 @@
|
||||
package gorm_test
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/now"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/now"
|
||||
)
|
||||
|
||||
func TestCreate(t *testing.T) {
|
||||
@ -288,6 +287,7 @@ func TestCreateIgnore(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPostgresReturningMultipleColumns(t *testing.T) {
|
||||
if DB.Dialect().GetName() == "postgres" {
|
||||
type ReturningMultipleColumns struct {
|
||||
ID uint `gorm:"primary_key"`
|
||||
SerialA int `gorm:"type:serial;not null"`
|
||||
@ -295,8 +295,6 @@ func TestPostgresReturningMultipleColumns(t *testing.T) {
|
||||
SerialC int `gorm:"type:serial;not null"`
|
||||
}
|
||||
|
||||
DB.LogMode(true)
|
||||
|
||||
err := DB.AutoMigrate(&ReturningMultipleColumns{}).Error
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -320,3 +318,4 @@ func TestPostgresReturningMultipleColumns(t *testing.T) {
|
||||
t.Error("SerialC should not be 0")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user