Skip to content

Commit

Permalink
Add tests for go-gitea#28765 (go-gitea#28773)
Browse files Browse the repository at this point in the history
Backport go-gitea#28773

Adds tests to cover changes made in go-gitea#28765
  • Loading branch information
jackHay22 committed Jan 12, 2024
1 parent 2a0fbe2 commit 243fbb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integration/api_user_watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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?token=%s", repo, tokenWithRepoScope))
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?token=%s", repo, tokenWithRepoScope))
MakeRequest(t, req, http.StatusOK)

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

0 comments on commit 243fbb8

Please sign in to comment.