summaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_hook_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_repo_hook_test.go')
-rw-r--r--tests/integration/api_repo_hook_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/integration/api_repo_hook_test.go b/tests/integration/api_repo_hook_test.go
index cf080575da..0fa2402992 100644
--- a/tests/integration/api_repo_hook_test.go
+++ b/tests/integration/api_repo_hook_test.go
@@ -8,6 +8,7 @@ import (
"net/http"
"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"
@@ -25,7 +26,7 @@ func TestAPICreateHook(t *testing.T) {
// user1 is an admin user
session := loginUser(t, "user1")
- token := getTokenForLoggedInUser(t, session)
+ token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepoHook)
completeURL := func(lastSegment string) string {
return fmt.Sprintf("/api/v1/repos/%s/%s/%s?token=%s", owner.Name, repo.Name, lastSegment, token)
}