1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-03 17:10:18 +00:00
This commit is contained in:
slene
2013-11-08 22:19:01 +08:00
parent 558738ade8
commit 167ad203cb
2 changed files with 37 additions and 6 deletions

View File

@ -696,8 +696,13 @@ func TestAll(t *testing.T) {
qs = dORM.QueryTable("user")
num, err = qs.Filter("user_name", "nothing").All(&users)
throwFail(t, err)
throwFail(t, AssertIs(num, 0))
throwFailNow(t, err)
throwFailNow(t, AssertIs(num, 0))
var users3 []*User
qs = dORM.QueryTable("user")
num, err = qs.Filter("user_name", "nothing").All(&users3)
throwFailNow(t, AssertIs(users3 == nil, false))
}
func TestOne(t *testing.T) {