From bc616fafbfa9c7ea618b887c4c331ab0e0214f90 Mon Sep 17 00:00:00 2001 From: Robert B Gordon Date: Fri, 29 Aug 2014 09:53:12 -0500 Subject: [PATCH] Fix the HasTable test, for real. --- main_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main_test.go b/main_test.go index d48c1878..797a78aa 100644 --- a/main_test.go +++ b/main_test.go @@ -133,14 +133,14 @@ func TestHasTable(t *testing.T) { Id int Stuff string } - db.DropTable(&Foo{}) - if table_ok := db.HasTable(&Foo{}); table_ok { + DB.DropTable(&Foo{}) + if table_ok := DB.HasTable(&Foo{}); table_ok { t.Errorf("Table should not exist, but does") } - if err := db.CreateTable(&Foo{}).Error; err != nil { + if err := DB.CreateTable(&Foo{}).Error; err != nil { t.Errorf("Table should be created") } - if table_ok := db.HasTable(&Foo{}); !table_ok { + if table_ok := DB.HasTable(&Foo{}); !table_ok { t.Errorf("Table should exist, but HasTable informs it does not") } }