Skip to content

Commit 243fbb8

Browse files
committed
Backport go-gitea#28773 Adds tests to cover changes made in go-gitea#28765
1 parent 2a0fbe2 commit 243fbb8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/integration/api_user_watch_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ func TestAPIWatch(t *testing.T) {
6363
t.Run("IsWatching", func(t *testing.T) {
6464
defer tests.PrintCurrentTest(t)()
6565

66-
req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription?token=%s", repo, tokenWithRepoScope))
66+
req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription", repo))
67+
MakeRequest(t, req, http.StatusUnauthorized)
68+
69+
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription?token=%s", repo, tokenWithRepoScope))
6770
MakeRequest(t, req, http.StatusOK)
6871

6972
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/subscription?token=%s", repo+"notexisting", tokenWithRepoScope))

0 commit comments

Comments
 (0)