Skip to content

Commit 2cf2561

Browse files
committed
Fix tests & typo in comment
1 parent 4329334 commit 2cf2561

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

models/fixtures/user.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
full_name: User 19
291291
292292
passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
293-
type: 1 # individual
293+
type: 1 # organization
294294
salt: ZogKvWdyEx
295295
is_admin: false
296296
avatar: avatar19

models/user_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ func TestSearchUsers(t *testing.T) {
6363
testOrgSuccess(&SearchUserOptions{OrderBy: "id ASC", Page: 2, PageSize: 2},
6464
[]int64{7, 17})
6565

66-
testOrgSuccess(&SearchUserOptions{Page: 3, PageSize: 2},
66+
testOrgSuccess(&SearchUserOptions{OrderBy: "id ASC", Page: 3, PageSize: 2},
67+
[]int64{19})
68+
69+
testOrgSuccess(&SearchUserOptions{Page: 4, PageSize: 2},
6770
[]int64{})
6871

6972
// test users
@@ -73,13 +76,13 @@ func TestSearchUsers(t *testing.T) {
7376
}
7477

7578
testUserSuccess(&SearchUserOptions{OrderBy: "id ASC", Page: 1},
76-
[]int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18})
79+
[]int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20})
7780

7881
testUserSuccess(&SearchUserOptions{Page: 1, IsActive: util.OptionalBoolFalse},
7982
[]int64{9})
8083

8184
testUserSuccess(&SearchUserOptions{OrderBy: "id ASC", Page: 1, IsActive: util.OptionalBoolTrue},
82-
[]int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18})
85+
[]int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20})
8386

8487
testUserSuccess(&SearchUserOptions{Keyword: "user1", OrderBy: "id ASC", Page: 1, IsActive: util.OptionalBoolTrue},
8588
[]int64{1, 10, 11, 12, 13, 14, 15, 16, 18})

0 commit comments

Comments
 (0)