1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 09:10:40 +00:00

fix the orm test

This commit is contained in:
astaxie
2018-07-20 19:58:56 +08:00
parent 0d0d87f600
commit 0711c3289f
2 changed files with 4 additions and 4 deletions

View File

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