summaryrefslogtreecommitdiffstats
path: root/integrations/api_repo_topic_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-06-07 07:27:09 +0200
committerGitHub <noreply@github.com>2021-06-07 07:27:09 +0200
commit3607f79d7869046d919fed05a21b55b6e61df1fa (patch)
tree9a176a4d5b67ac3a81ae210e9164d81959221ce0 /integrations/api_repo_topic_test.go
parent51775f65bc933843199320b040186703a2bb9f51 (diff)
downloadgitea-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.gz
gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.zip
Fixed assert statements. (#16089)
Diffstat (limited to 'integrations/api_repo_topic_test.go')
-rw-r--r--integrations/api_repo_topic_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/integrations/api_repo_topic_test.go b/integrations/api_repo_topic_test.go
index b96489ae22..5e42bc64bf 100644
--- a/integrations/api_repo_topic_test.go
+++ b/integrations/api_repo_topic_test.go
@@ -88,7 +88,7 @@ func TestAPIRepoTopic(t *testing.T) {
req = NewRequest(t, "GET", url)
res = session.MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, res, &topics)
- assert.Equal(t, 25, len(topics.TopicNames))
+ assert.Len(t, topics.TopicNames, 25)
// Test writing more topics than allowed
newTopics = append(newTopics, "t26")
@@ -115,7 +115,7 @@ func TestAPIRepoTopic(t *testing.T) {
req = NewRequest(t, "GET", url)
res = session.MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, res, &topics)
- assert.Equal(t, 0, len(topics.TopicNames))
+ assert.Empty(t, topics.TopicNames)
// Test add a topic to repo with write access (requires repo admin access)
req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s?token=%s", user3.Name, repo3.Name, "topicName", token4)