mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 13:01:29 +00:00
fix TestAll()
This commit is contained in:
parent
1bd3fb7a33
commit
dea45a3d6c
@ -1011,13 +1011,13 @@ func TestAll(t *testing.T) {
|
|||||||
|
|
||||||
qs = dORM.QueryTable("user")
|
qs = dORM.QueryTable("user")
|
||||||
num, err = qs.Filter("user_name", "nothing").All(&users)
|
num, err = qs.Filter("user_name", "nothing").All(&users)
|
||||||
throwFailNow(t, AssertIs(err, ErrNoRows))
|
throwFailNow(t, err)
|
||||||
throwFailNow(t, AssertIs(num, 0))
|
throwFailNow(t, AssertIs(num, 0))
|
||||||
|
|
||||||
var users3 []*User
|
var users3 []*User
|
||||||
qs = dORM.QueryTable("user")
|
qs = dORM.QueryTable("user")
|
||||||
num, err = qs.Filter("user_name", "nothing").All(&users3)
|
num, err = qs.Filter("user_name", "nothing").All(&users3)
|
||||||
throwFailNow(t, AssertIs(err, ErrNoRows))
|
throwFailNow(t, err)
|
||||||
throwFailNow(t, AssertIs(num, 0))
|
throwFailNow(t, AssertIs(num, 0))
|
||||||
throwFailNow(t, AssertIs(users3 == nil, false))
|
throwFailNow(t, AssertIs(users3 == nil, false))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user