diff options
author | Robin Bobbitt <ryehle@us.ibm.com> | 2017-08-04 09:17:20 -0400 |
---|---|---|
committer | Robin Bobbitt <ryehle@us.ibm.com> | 2017-08-21 18:13:32 -0400 |
commit | 62ef67acc3a8d260aa3e641b350aaecf8d60f1aa (patch) | |
tree | 9d120306e3a551f85e7ab0ac2efbbf1684899139 /spec/support/api | |
parent | e6d87021f31839395fdbdedc36613a57fb771375 (diff) | |
download | gitlab-ce-62ef67acc3a8d260aa3e641b350aaecf8d60f1aa.tar.gz |
Hide read_registry scope when registry is disabled on instance
Diffstat (limited to 'spec/support/api')
-rw-r--r-- | spec/support/api/scopes/read_user_shared_examples.rb | 4 |
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) |