diff options
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/reactive_caching_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/concerns/reactive_caching_spec.rb b/spec/models/concerns/reactive_caching_spec.rb index 0f156619e9e..79f75c0ffa0 100644 --- a/spec/models/concerns/reactive_caching_spec.rb +++ b/spec/models/concerns/reactive_caching_spec.rb @@ -125,6 +125,13 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do go! end + it "calls a reactive_cache_updated only once if content did not change on subsequent update" do + expect(instance).to receive(:calculate_reactive_cache).twice + expect(instance).to receive(:reactive_cache_updated).once + + 2.times { instance.exclusively_update_reactive_cache! } + end + context 'and #calculate_reactive_cache raises an exception' do before do stub_reactive_cache(instance, "preexisting") |