Fix migration tests

This commit is contained in:
Jinzhu 2014-11-25 14:41:09 +08:00
parent e9684db42a
commit a7e63541fd
1 changed files with 2 additions and 2 deletions

View File

@ -82,8 +82,8 @@ func (b BigEmail) TableName() string {
} }
func TestAutoMigration(t *testing.T) { func TestAutoMigration(t *testing.T) {
DB.AutoMigrate(Address{}) DB.AutoMigrate(&Address{})
if err := DB.Table("emails").AutoMigrate(BigEmail{}).Error; err != nil { if err := DB.Table("emails").AutoMigrate(&BigEmail{}).Error; err != nil {
t.Errorf("Auto Migrate should not raise any error") t.Errorf("Auto Migrate should not raise any error")
} }