about summary refs log tree commit diff
path: root/spec/services/batched_remove_status_service_spec.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-04-28 17:47:34 +0200
committerGitHub <noreply@github.com>2022-04-28 17:47:34 +0200
commit3917353645b91dae04f7d9b81162fead6f73072a (patch)
tree202cbf93dfa378c26a291900ea65ec088ee5b5cc /spec/services/batched_remove_status_service_spec.rb
parent9bf04db23acf10e05ffdf7def06c246081f8f065 (diff)
Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
Diffstat (limited to 'spec/services/batched_remove_status_service_spec.rb')
-rw-r--r--spec/services/batched_remove_status_service_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/batched_remove_status_service_spec.rb b/spec/services/batched_remove_status_service_spec.rb
index 8f38908cd..920edeb13 100644
--- a/spec/services/batched_remove_status_service_spec.rb
+++ b/spec/services/batched_remove_status_service_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe BatchedRemoveStatusService, type: :service do
   let(:status2) { PostStatusService.new.call(alice, text: 'Another status') }
 
   before do
-    allow(Redis.current).to receive_messages(publish: nil)
+    allow(redis).to receive_messages(publish: nil)
 
     stub_request(:post, 'http://example.com/inbox').to_return(status: 200)
 
@@ -40,11 +40,11 @@ RSpec.describe BatchedRemoveStatusService, type: :service do
   end
 
   it 'notifies streaming API of followers' do
-    expect(Redis.current).to have_received(:publish).with("timeline:#{jeff.id}", any_args).at_least(:once)
+    expect(redis).to have_received(:publish).with("timeline:#{jeff.id}", any_args).at_least(:once)
   end
 
   it 'notifies streaming API of public timeline' do
-    expect(Redis.current).to have_received(:publish).with('timeline:public', any_args).at_least(:once)
+    expect(redis).to have_received(:publish).with('timeline:public', any_args).at_least(:once)
   end
 
   it 'sends delete activity to followers' do