aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/api_user_watch_test.go
diff options
context:
space:
mode:
authorJack Hay <jack@allspice.io>2024-01-12 12:15:42 -0500
committerGitHub <noreply@github.com>2024-01-12 17:15:42 +0000
commit6c6823935c4810a071a3919a88819b0ed156bf43 (patch)
tree938c51e5b6853da787209e9527e8ef5751f65e32 /tests/integration/api_user_watch_test.go
parent9b59af37e72656c71316ec79b5c377a2eb84c671 (diff)
downloadgitea-6c6823935c4810a071a3919a88819b0ed156bf43.tar.gz
gitea-6c6823935c4810a071a3919a88819b0ed156bf43.zip
Add tests for #28765 (#28773)
Adds tests to cover changes made in #28765
Diffstat (limited to 'tests/integration/api_user_watch_test.go')
-rw-r--r--tests/integration/api_user_watch_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/integration/api_user_watch_test.go b/tests/integration/api_user_watch_test.go
index 20528959e8..953e00551d 100644
--- a/tests/integration/api_user_watch_test.go
+++ b/tests/integration/api_user_watch_test.go
@@ -66,7 +66,10 @@ func TestAPIWatch(t *testing.T) {
t.Run("IsWatching", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
- req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription", repo)).
+ req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription", repo))
+ MakeRequest(t, req, http.StatusUnauthorized)
+
+ req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription", repo)).
AddTokenAuth(tokenWithRepoScope)
MakeRequest(t, req, http.StatusOK)