diff options
Diffstat (limited to 'spec/services/merge_requests/reload_diffs_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/reload_diffs_service_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/services/merge_requests/reload_diffs_service_spec.rb b/spec/services/merge_requests/reload_diffs_service_spec.rb index d2444af1b0f..3d5b65207e6 100644 --- a/spec/services/merge_requests/reload_diffs_service_spec.rb +++ b/spec/services/merge_requests/reload_diffs_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequests::ReloadDiffsService, :use_clean_rails_memory_store_caching do +RSpec.describe MergeRequests::ReloadDiffsService, :use_clean_rails_memory_store_caching do let(:current_user) { create(:user) } let(:merge_request) { create(:merge_request) } let(:subject) { described_class.new(merge_request, current_user) } @@ -34,10 +34,8 @@ describe MergeRequests::ReloadDiffsService, :use_clean_rails_memory_store_cachin context 'cache clearing' do it 'clears the cache for older diffs on the merge request' do - old_diff = merge_request.merge_request_diff - old_cache_key = old_diff.diffs_collection.cache_key - - expect_any_instance_of(Redis).to receive(:del).with(old_cache_key).and_call_original + expect_any_instance_of(Redis).to receive(:del).once.and_call_original + expect(Rails.cache).to receive(:delete).once.and_call_original subject.execute end |