diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/packages_manager_api_spec_helpers.rb (renamed from spec/support/helpers/packages_manager_api_spec_helper.rb) | 0 | ||||
-rw-r--r-- | spec/support/rspec_order_todo.yml | 1 | ||||
-rw-r--r-- | spec/support/shared_examples/requests/api/helm_packages_shared_examples.rb | 10 |
3 files changed, 9 insertions, 2 deletions
diff --git a/spec/support/helpers/packages_manager_api_spec_helper.rb b/spec/support/helpers/packages_manager_api_spec_helpers.rb index 1c9fce183e9..1c9fce183e9 100644 --- a/spec/support/helpers/packages_manager_api_spec_helper.rb +++ b/spec/support/helpers/packages_manager_api_spec_helpers.rb diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml index 93370935125..5a70d1f1d5e 100644 --- a/spec/support/rspec_order_todo.yml +++ b/spec/support/rspec_order_todo.yml @@ -4329,7 +4329,6 @@ - './spec/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb' - './spec/graphql/mutations/alert_management/prometheus_integration/update_spec.rb' - './spec/graphql/mutations/alert_management/update_alert_status_spec.rb' -- './spec/graphql/mutations/base_mutation_spec.rb' - './spec/graphql/mutations/boards/issues/issue_move_list_spec.rb' - './spec/graphql/mutations/boards/lists/create_spec.rb' - './spec/graphql/mutations/boards/lists/update_spec.rb' diff --git a/spec/support/shared_examples/requests/api/helm_packages_shared_examples.rb b/spec/support/shared_examples/requests/api/helm_packages_shared_examples.rb index 7803f0ff04d..9c20b95eb80 100644 --- a/spec/support/shared_examples/requests/api/helm_packages_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/helm_packages_shared_examples.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.shared_examples 'rejects helm packages access' do |user_type, status| +RSpec.shared_examples 'rejects helm packages access' do |user_type, status, body| context "for user type #{user_type}" do before do project.send("add_#{user_type}", user) if user_type != :anonymous && user_type != :not_a_member @@ -15,6 +15,14 @@ RSpec.shared_examples 'rejects helm packages access' do |user_type, status| expect(response.headers['WWW-Authenticate']).to eq 'Basic realm="GitLab Packages Registry"' end end + + if body + it 'has the correct body' do + subject + + expect(response.body).to eq(body) + end + end end end |