summaryrefslogtreecommitdiff
path: root/spec/models/concerns/reactive_caching_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/concerns/reactive_caching_spec.rb')
-rw-r--r--spec/models/concerns/reactive_caching_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/concerns/reactive_caching_spec.rb b/spec/models/concerns/reactive_caching_spec.rb
index 79f75c0ffa0..97a4c212f1c 100644
--- a/spec/models/concerns/reactive_caching_spec.rb
+++ b/spec/models/concerns/reactive_caching_spec.rb
@@ -85,6 +85,14 @@ describe ReactiveCaching, :use_clean_rails_memory_store_caching do
it { is_expected.to be_nil }
end
+
+ context 'when cache was invalidated' do
+ it 'refreshes cache' do
+ expect(ReactiveCachingWorker).to receive(:perform_async).with(CacheTest, 666)
+
+ instance.with_reactive_cache { raise described_class::InvalidateReactiveCache }
+ end
+ end
end
end