Skip to content

Commit

Permalink
Fix HasTable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Aug 30, 2014
1 parent 471eda5 commit e9ecf9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ func TestHasTable(t *testing.T) {
Stuff string
}
DB.DropTable(&Foo{})
if table_ok := DB.HasTable(&Foo{}); table_ok {
if ok := DB.HasTable(&Foo{}); ok {
t.Errorf("Table should not exist, but does")
}
if err := DB.CreateTable(&Foo{}).Error; err != nil {
t.Errorf("Table should be created")
}
if table_ok := DB.HasTable(&Foo{}); !table_ok {
if ok := DB.HasTable(&Foo{}); !ok {
t.Errorf("Table should exist, but HasTable informs it does not")
}
}
Expand Down

0 comments on commit e9ecf9c

Please sign in to comment.