Skip to content

Commit

Permalink
Clarify test
Browse files Browse the repository at this point in the history
  • Loading branch information
irees committed Oct 30, 2023
1 parent 18fd744 commit 7366b5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/rest/feed_version_download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7366b5a

Please sign in to comment.