From 5e31f7d14b661604af22041b3f4a8b679a74606c Mon Sep 17 00:00:00 2001 From: FlyingOnion <731677080@qq.com> Date: Mon, 18 Sep 2023 09:55:52 +0800 Subject: [PATCH] remove a unit test --- tests/session_count_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/session_count_test.go b/tests/session_count_test.go index 24c5d24a..7b359812 100644 --- a/tests/session_count_test.go +++ b/tests/session_count_test.go @@ -118,16 +118,11 @@ func TestWithTableName(t *testing.T) { }) assert.NoError(t, err) - total, err := testEngine.OrderBy("count(`id`) desc").Count(new(CountWithTableName)) + total, err := testEngine.Count(new(CountWithTableName)) assert.NoError(t, err) assert.EqualValues(t, 2, total) - total, err = testEngine.OrderBy("count(`id`) desc").Count(CountWithTableName{}) - assert.NoError(t, err) - assert.EqualValues(t, 2, total) - - // the orderby will be ignored by count because some databases will return errors if the orderby columns not in group by - total, err = testEngine.OrderBy("`name`").Count(CountWithTableName{}) + total, err = testEngine.Count(CountWithTableName{}) assert.NoError(t, err) assert.EqualValues(t, 2, total) }