summaryrefslogtreecommitdiff
path: root/spec/support/api/scopes/read_user_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/api/scopes/read_user_shared_examples.rb')
-rw-r--r--spec/support/api/scopes/read_user_shared_examples.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/api/scopes/read_user_shared_examples.rb b/spec/support/api/scopes/read_user_shared_examples.rb
index 3bd589d64b9..57e28e040d7 100644
--- a/spec/support/api/scopes/read_user_shared_examples.rb
+++ b/spec/support/api/scopes/read_user_shared_examples.rb
@@ -23,6 +23,10 @@ shared_examples_for 'allows the "read_user" scope' do
context 'when the requesting token does not have any required scope' do
let(:token) { create(:personal_access_token, scopes: ['read_registry'], user: user) }
+ before do
+ stub_container_registry_config(enabled: true)
+ end
+
it 'returns a "401" response' do
get api_call.call(path, user, personal_access_token: token)