about summary refs log tree commit diff
path: root/spec/models/setting_spec.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-03-24 10:53:50 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-03-24 10:53:50 +0100
commitf60c99a8fb0c99554fce091cac61d9ed07eef573 (patch)
tree27457a4e091b820269daedb2f709ca304bcf5d06 /spec/models/setting_spec.rb
parentd7c1c41859549212a6d34ad869fded16acc17b48 (diff)
parent88d69d3261c2f02278d07dc302ff7fc15bd68e8c (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'spec/models/setting_spec.rb')
-rw-r--r--spec/models/setting_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/models/setting_spec.rb b/spec/models/setting_spec.rb
index 1cc528674..3ccc21d6c 100644
--- a/spec/models/setting_spec.rb
+++ b/spec/models/setting_spec.rb
@@ -99,11 +99,12 @@ RSpec.describe Setting, type: :model do
         end
 
         it 'does not query the database' do
-          expect do |callback|
-            ActiveSupport::Notifications.subscribed callback, 'sql.active_record' do
-              described_class[key]
-            end
-          end.not_to yield_control
+          callback = double
+          allow(callback).to receive(:call)
+          ActiveSupport::Notifications.subscribed callback, 'sql.active_record' do
+            described_class[key]
+          end
+          expect(callback).not_to have_received(:call)
         end
 
         it 'returns the cached value' do