summaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_topic_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_repo_topic_test.go')
-rw-r--r--tests/integration/api_repo_topic_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/integration/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go
index 81eb1a9427..ab9fd9bb96 100644
--- a/tests/integration/api_repo_topic_test.go
+++ b/tests/integration/api_repo_topic_test.go
@@ -9,6 +9,7 @@ import (
"net/url"
"testing"
+ auth_model "code.gitea.io/gitea/models/auth"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
@@ -59,7 +60,7 @@ func TestAPIRepoTopic(t *testing.T) {
repo3 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 3})
// Get user2's token
- token2 := getUserToken(t, user2.Name)
+ token2 := getUserToken(t, user2.Name, auth_model.AccessTokenScopeRepo)
// Test read topics using login
url := fmt.Sprintf("/api/v1/repos/%s/%s/topics", user2.Name, repo2.Name)
@@ -139,7 +140,7 @@ func TestAPIRepoTopic(t *testing.T) {
MakeRequest(t, req, http.StatusNotFound)
// Get user4's token
- token4 := getUserToken(t, user4.Name)
+ token4 := getUserToken(t, user4.Name, auth_model.AccessTokenScopeRepo)
// Test read topics with write access
url = fmt.Sprintf("/api/v1/repos/%s/%s/topics?token=%s", user3.Name, repo3.Name, token4)