From 9aacae473c644f9f39d6a2093469b32b649f46b6 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 30 Oct 2013 08:57:48 +0800 Subject: [PATCH] Add tests for plain text time --- gorm_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gorm_test.go b/gorm_test.go index 9275c7a0..f726314d 100644 --- a/gorm_test.go +++ b/gorm_test.go @@ -237,6 +237,12 @@ func TestComplexWhere(t *testing.T) { t.Errorf("Should only found 3 users's birthday >= t2", len(users)) } + users = []User{} + db.Where("birthday > ?", "2002-10-10").Find(&users) + if len(users) != 3 { + t.Errorf("Should only found 3 users's birthday >= t2", len(users)) + } + users = []User{} db.Where("birthday >= ?", t1).Where("birthday < ?", t2).Find(&users) if len(users) != 1 {