Commit 30bbc81a authored by Penghui Liao's avatar Penghui Liao

fix test case that calls All()

Signed-off-by: 's avatarPenghui Liao <liaoishere@gmail.com>
parent 1a3f1d66
......@@ -1011,13 +1011,13 @@ func TestAll(t *testing.T) {
qs = dORM.QueryTable("user")
num, err = qs.Filter("user_name", "nothing").All(&users)
throwFailNow(t, err)
throwFail(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)
throwFail(t, AssertIs(err, ErrNoRows))
throwFailNow(t, AssertIs(num, 0))
throwFailNow(t, AssertIs(users3 == nil, false))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment