diff options
Diffstat (limited to 'spec/requests/api/graphql/group/dependency_proxy_group_setting_spec.rb')
-rw-r--r-- | spec/requests/api/graphql/group/dependency_proxy_group_setting_spec.rb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/requests/api/graphql/group/dependency_proxy_group_setting_spec.rb b/spec/requests/api/graphql/group/dependency_proxy_group_setting_spec.rb index aca8527ba0a..c8745fcbb62 100644 --- a/spec/requests/api/graphql/group/dependency_proxy_group_setting_spec.rb +++ b/spec/requests/api/graphql/group/dependency_proxy_group_setting_spec.rb @@ -46,12 +46,15 @@ RSpec.describe 'getting dependency proxy settings for a group', feature_category context 'with different permissions' do where(:group_visibility, :role, :access_granted) do - :private | :maintainer | true + :private | :owner | true + :private | :maintainer | false :private | :developer | false :private | :reporter | false :private | :guest | false :private | :anonymous | false - :public | :maintainer | true + + :public | :owner | true + :public | :maintainer | false :public | :developer | false :public | :reporter | false :public | :guest | false @@ -73,6 +76,20 @@ RSpec.describe 'getting dependency proxy settings for a group', feature_category expect(dependency_proxy_group_setting_response).to be_blank end end + + context 'with disabled admin_package feature flag' do + before do + stub_feature_flags(raise_group_admin_package_permission_to_owner: false) + end + + if params[:role] == :maintainer + it 'return the proper response' do + subject + + expect(dependency_proxy_group_setting_response).to eq('enabled' => true) + end + end + end end end end |