summaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_file_create_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_repo_file_create_test.go')
-rw-r--r--tests/integration/api_repo_file_create_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/integration/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go
index 476441dbb1..b2098fdd03 100644
--- a/tests/integration/api_repo_file_create_test.go
+++ b/tests/integration/api_repo_file_create_test.go
@@ -13,6 +13,7 @@ import (
"testing"
"time"
+ 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"
@@ -150,10 +151,10 @@ func TestAPICreateFile(t *testing.T) {
// Get user2's token
session := loginUser(t, user2.Name)
- token2 := getTokenForLoggedInUser(t, session)
+ token2 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeRepo)
// Get user4's token
session = loginUser(t, user4.Name)
- token4 := getTokenForLoggedInUser(t, session)
+ token4 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeRepo)
// Test creating a file in repo1 which user2 owns, try both with branch and empty branch
for _, branch := range [...]string{
@@ -279,7 +280,7 @@ func TestAPICreateFile(t *testing.T) {
MakeRequest(t, req, http.StatusForbidden)
// Test creating a file in an empty repository
- doAPICreateRepository(NewAPITestContext(t, "user2", "empty-repo"), true)(t)
+ doAPICreateRepository(NewAPITestContext(t, "user2", "empty-repo", auth_model.AccessTokenScopeRepo), true)(t)
createFileOptions = getCreateFileOptions()
fileID++
treePath = fmt.Sprintf("new/file%d.txt", fileID)