From dea45a3d6c711789d83ade3eeee4166fc42f1112 Mon Sep 17 00:00:00 2001 From: hurisheng Date: Tue, 7 Aug 2018 16:36:27 +0800 Subject: [PATCH] fix TestAll() --- 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 cdb2fe3f..ceb814ff 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, AssertIs(err, ErrNoRows)) + 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(err, ErrNoRows)) + throwFailNow(t, err) throwFailNow(t, AssertIs(num, 0)) throwFailNow(t, AssertIs(users3 == nil, false)) }