From 6c6823935c4810a071a3919a88819b0ed156bf43 Mon Sep 17 00:00:00 2001 From: Jack Hay Date: Fri, 12 Jan 2024 12:15:42 -0500 Subject: [PATCH] Add tests for #28765 (#28773) Adds tests to cover changes made in #28765 --- tests/integration/api_user_watch_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/api_user_watch_test.go b/tests/integration/api_user_watch_test.go index 20528959e..953e00551 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)