From 30bbc81a2e784862854af5b6577d9347def028ad Mon Sep 17 00:00:00 2001 From: Penghui Liao Date: Fri, 20 Jul 2018 16:51:36 +0800 Subject: [PATCH] fix test case that calls All() Signed-off-by: Penghui Liao --- orm/orm_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orm/orm_test.go b/orm/orm_test.go index ceb814ff..a27a5fcb 100644 --- a/orm/orm_test.go +++ b/orm/orm_test.go @@ -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)) }