From 7366b5a3e5178718769fdf58b318002d1e7c9fc2 Mon Sep 17 00:00:00 2001 From: Ian Rees Date: Mon, 30 Oct 2023 12:57:02 -0700 Subject: [PATCH] Clarify test --- server/rest/feed_version_download_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/rest/feed_version_download_test.go b/server/rest/feed_version_download_test.go index 081b857a..3949ba83 100644 --- a/server/rest/feed_version_download_test.go +++ b/server/rest/feed_version_download_test.go @@ -170,11 +170,11 @@ func TestFeedDownloadLatestRequest(t *testing.T) { t.Errorf("got status code %d, expected 401", sc) } }) - t.Run("not authorized as user,license", func(t *testing.T) { + t.Run("not authorized as user, not redistributable", func(t *testing.T) { req, _ := http.NewRequest("GET", "/feeds/BA/download_latest_feed_version", nil) rr := httptest.NewRecorder() asUser := ancheck.NewUserDefaultMiddleware(func() authn.User { - return authn.NewCtxUser("testuser", "", "").WithRoles("testrole") + return authn.NewCtxUser("testuser", "", "").WithRoles("download_latest_feed_version") })(restSrv) asUser.ServeHTTP(rr, req) if sc := rr.Result().StatusCode; sc != 401 {