Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/files_spec.rb')
-rw-r--r--spec/requests/api/files_spec.rb8
1 files changed, 3 insertions, 5 deletions
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)