diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-21 00:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-21 00:09:21 +0300 |
commit | c972699d3975e61785389602bfc8078d3bc40091 (patch) | |
tree | 37099f37fbe720f3dc988cbb6d92359428243eaf /spec/requests | |
parent | 995bcca3fc5544e5d2d8ee274dc9275d5b4ce375 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
6 files changed, 8 insertions, 10 deletions
diff --git a/spec/requests/api/ci/job_artifacts_spec.rb b/spec/requests/api/ci/job_artifacts_spec.rb index 7cea744cdb9..6f4e7fd66ed 100644 --- a/spec/requests/api/ci/job_artifacts_spec.rb +++ b/spec/requests/api/ci/job_artifacts_spec.rb @@ -541,7 +541,7 @@ RSpec.describe API::Ci::JobArtifacts, feature_category: :build_artifacts do let(:download_headers) do { 'Content-Transfer-Encoding' => 'binary', 'Content-Disposition' => - %Q(attachment; filename="#{job_with_artifacts.artifacts_file.filename}"; filename*=UTF-8''#{job.artifacts_file.filename}) } + %(attachment; filename="#{job_with_artifacts.artifacts_file.filename}"; filename*=UTF-8''#{job.artifacts_file.filename}) } end it { expect(response).to have_gitlab_http_status(:ok) } diff --git a/spec/requests/api/deployments_spec.rb b/spec/requests/api/deployments_spec.rb index d7056adfcb6..82ac2eed83d 100644 --- a/spec/requests/api/deployments_spec.rb +++ b/spec/requests/api/deployments_spec.rb @@ -424,7 +424,7 @@ RSpec.describe API::Deployments, feature_category: :continuous_delivery do ) expect(response).to have_gitlab_http_status(:bad_request) - expect(json_response['message']['status']).to include(%Q{cannot transition via \"run\"}) + expect(json_response['message']['status']).to include(%{cannot transition via \"run\"}) end it 'links merge requests when the deployment status changes to success', :sidekiq_inline do diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb index ed84e3e5f48..ea341703301 100644 --- a/spec/requests/api/files_spec.rb +++ b/spec/requests/api/files_spec.rb @@ -141,11 +141,9 @@ RSpec.describe API::Files, feature_category: :source_code_management do it 'caches sha256 of the content', :use_clean_rails_redis_caching do head api(route(file_path), current_user, **options), params: params - expect(Gitlab::Cache::Client).to receive(:build_with_metadata).with( - cache_identifier: 'API::Files#content_sha', - feature_category: :source_code_management, - backing_resource: :gitaly - ).and_call_original + expect_next_instance_of(Gitlab::Cache::Client) do |instance| + expect(instance).to receive(:fetch).with(anything, nil, { cache_identifier: 'API::Files#content_sha', backing_resource: :gitaly }).and_call_original + end expect(Rails.cache.fetch("blob_content_sha256:#{project.full_path}:#{response.headers['X-Gitlab-Blob-Id']}")) .to eq(content_sha256) diff --git a/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb b/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb index 09e884d9412..c3f818b6627 100644 --- a/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb +++ b/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb @@ -53,7 +53,7 @@ RSpec.describe 'Destroying a Snippet', feature_category: :source_code_management let!(:snippet_gid) { project.to_gid.to_s } it 'returns an error' do - err_message = %Q["#{snippet_gid}" does not represent an instance of Snippet] + err_message = %["#{snippet_gid}" does not represent an instance of Snippet] post_graphql_mutation(mutation, current_user: current_user) diff --git a/spec/requests/api/graphql/project/incident_management/timeline_events_spec.rb b/spec/requests/api/graphql/project/incident_management/timeline_events_spec.rb index 7587b227d9f..dd383226e17 100644 --- a/spec/requests/api/graphql/project/incident_management/timeline_events_spec.rb +++ b/spec/requests/api/graphql/project/incident_management/timeline_events_spec.rb @@ -15,7 +15,7 @@ RSpec.describe 'getting incident timeline events', feature_category: :incident_m let_it_be(:promoted_from_note) { create(:note, project: project, noteable: incident) } let_it_be(:issue_url) { project_issue_url(private_project, issue) } let_it_be(:issue_ref) { "#{private_project.full_path}##{issue.iid}" } - let_it_be(:issue_link) { %Q(<a href="#{issue_url}">#{issue_url}</a>) } + let_it_be(:issue_link) { %(<a href="#{issue_url}">#{issue_url}</a>) } let_it_be(:timeline_event) do create( diff --git a/spec/requests/projects/packages/package_files_controller_spec.rb b/spec/requests/projects/packages/package_files_controller_spec.rb index e5849be9f13..4f1793b831d 100644 --- a/spec/requests/projects/packages/package_files_controller_spec.rb +++ b/spec/requests/projects/packages/package_files_controller_spec.rb @@ -22,7 +22,7 @@ RSpec.describe Projects::Packages::PackageFilesController, feature_category: :pa subject expect(response.headers['Content-Disposition']) - .to eq(%Q(attachment; filename="#{filename}"; filename*=UTF-8''#{filename})) + .to eq(%(attachment; filename="#{filename}"; filename*=UTF-8''#{filename})) end it_behaves_like 'bumping the package last downloaded at field' |