diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 18:06:27 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 18:06:27 +0000 |
commit | d2801eda8464e5e9ce730caf30111c1190fe87a0 (patch) | |
tree | 9b2814ff0c6a61ac192b86afaa35fa2d1985277b /spec/models/concerns | |
parent | 88542a5e9613c8442a982e65ad5cf13eb33bc541 (diff) | |
download | gitlab-ce-d2801eda8464e5e9ce730caf30111c1190fe87a0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/reactive_caching_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/concerns/reactive_caching_spec.rb b/spec/models/concerns/reactive_caching_spec.rb index 3d026932f59..4af6906ce2c 100644 --- a/spec/models/concerns/reactive_caching_spec.rb +++ b/spec/models/concerns/reactive_caching_spec.rb @@ -196,6 +196,12 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do 2.times { instance.exclusively_update_reactive_cache! } end + it 'does not delete the value key' do + expect(Rails.cache).to receive(:delete).with(cache_key).never + + go! + end + context 'and #calculate_reactive_cache raises an exception' do before do stub_reactive_cache(instance, "preexisting") @@ -223,6 +229,12 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do go! end + + it 'deletes the value key' do + expect(Rails.cache).to receive(:delete).with(cache_key).once + + go! + end end context 'when the lease is already taken' do |