Skip to content

Commit b606c72

Browse files
committed
fix: testing topic
1 parent f30352a commit b606c72

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

models/topic_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestAddTopic(t *testing.T) {
1515

1616
topics, err := FindTopics(&FindTopicOptions{})
1717
assert.NoError(t, err)
18-
assert.EqualValues(t, 3, len(topics))
18+
assert.EqualValues(t, 4, len(topics))
1919

2020
topics, err = FindTopics(&FindTopicOptions{
2121
Limit: 2,
@@ -32,7 +32,7 @@ func TestAddTopic(t *testing.T) {
3232
assert.NoError(t, SaveTopics(2, "golang"))
3333
topics, err = FindTopics(&FindTopicOptions{})
3434
assert.NoError(t, err)
35-
assert.EqualValues(t, 3, len(topics))
35+
assert.EqualValues(t, 4, len(topics))
3636

3737
topics, err = FindTopics(&FindTopicOptions{
3838
RepoID: 2,
@@ -47,7 +47,7 @@ func TestAddTopic(t *testing.T) {
4747

4848
topics, err = FindTopics(&FindTopicOptions{})
4949
assert.NoError(t, err)
50-
assert.EqualValues(t, 4, len(topics))
50+
assert.EqualValues(t, 5, len(topics))
5151

5252
topics, err = FindTopics(&FindTopicOptions{
5353
RepoID: 2,

models/user_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ func TestSearchUsers(t *testing.T) {
7777
}
7878

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

8282
testUserSuccess(&SearchUserOptions{Page: 1, IsActive: util.OptionalBoolFalse},
8383
[]int64{9})
8484

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

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

0 commit comments

Comments
 (0)