aboutsummaryrefslogtreecommitdiffstats
path: root/models/topic_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/topic_test.go')
-rw-r--r--models/topic_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/models/topic_test.go b/models/topic_test.go
index b6ef8f565c..25232eb981 100644
--- a/models/topic_test.go
+++ b/models/topic_test.go
@@ -19,31 +19,31 @@ func TestAddTopic(t *testing.T) {
topics, err := FindTopics(&FindTopicOptions{})
assert.NoError(t, err)
- assert.EqualValues(t, totalNrOfTopics, len(topics))
+ assert.Len(t, topics, totalNrOfTopics)
topics, err = FindTopics(&FindTopicOptions{
ListOptions: ListOptions{Page: 1, PageSize: 2},
})
assert.NoError(t, err)
- assert.EqualValues(t, 2, len(topics))
+ assert.Len(t, topics, 2)
topics, err = FindTopics(&FindTopicOptions{
RepoID: 1,
})
assert.NoError(t, err)
- assert.EqualValues(t, repo1NrOfTopics, len(topics))
+ assert.Len(t, topics, repo1NrOfTopics)
assert.NoError(t, SaveTopics(2, "golang"))
repo2NrOfTopics = 1
topics, err = FindTopics(&FindTopicOptions{})
assert.NoError(t, err)
- assert.EqualValues(t, totalNrOfTopics, len(topics))
+ assert.Len(t, topics, totalNrOfTopics)
topics, err = FindTopics(&FindTopicOptions{
RepoID: 2,
})
assert.NoError(t, err)
- assert.EqualValues(t, repo2NrOfTopics, len(topics))
+ assert.Len(t, topics, repo2NrOfTopics)
assert.NoError(t, SaveTopics(2, "golang", "gitea"))
repo2NrOfTopics = 2
@@ -54,13 +54,13 @@ func TestAddTopic(t *testing.T) {
topics, err = FindTopics(&FindTopicOptions{})
assert.NoError(t, err)
- assert.EqualValues(t, totalNrOfTopics, len(topics))
+ assert.Len(t, topics, totalNrOfTopics)
topics, err = FindTopics(&FindTopicOptions{
RepoID: 2,
})
assert.NoError(t, err)
- assert.EqualValues(t, repo2NrOfTopics, len(topics))
+ assert.Len(t, topics, repo2NrOfTopics)
}
func TestTopicValidator(t *testing.T) {