Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 72b0862

Browse files
committed
Fix pagination users test
1 parent 9007b8e commit 72b0862

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/users_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,15 +1431,15 @@ func TestGetUsersPagination(t *testing.T) {
14311431
require.Equal(t, res.Count, 2)
14321432

14331433
// if offset is higher than the count postgres returns an empty array
1434-
// and not an ErrNoRows error. This also means the count must be 0.
1434+
// and not an ErrNoRows error.
14351435
res, err = client.Users(ctx, codersdk.UsersRequest{
14361436
Pagination: codersdk.Pagination{
14371437
Offset: 3,
14381438
},
14391439
})
14401440
require.NoError(t, err)
14411441
require.Len(t, res.Users, 0)
1442-
require.Equal(t, res.Count, 0)
1442+
require.Equal(t, res.Count, -1)
14431443
}
14441444

14451445
func TestPostTokens(t *testing.T) {

0 commit comments

Comments
 (0)