Consolidate configuration of Sidekiq::Testing.fake!
setup (#28046)
This commit is contained in:
parent
c810b197ad
commit
973597c6f1
10 changed files with 28 additions and 65 deletions
|
@ -23,7 +23,7 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
stub_request(:get, 'http://example.com/emojib.png').to_return(body: attachment_fixture('emojo.png'), headers: { 'Content-Type' => 'application/octet-stream' })
|
||||
end
|
||||
|
||||
describe 'processing posts received out of order' do
|
||||
describe 'processing posts received out of order', :sidekiq_fake do
|
||||
let(:follower) { Fabricate(:account, username: 'bob') }
|
||||
|
||||
let(:object_json) do
|
||||
|
@ -77,13 +77,6 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
follower.follow!(sender)
|
||||
end
|
||||
|
||||
around do |example|
|
||||
Sidekiq::Testing.fake! do
|
||||
example.run
|
||||
Sidekiq::Worker.clear_all
|
||||
end
|
||||
end
|
||||
|
||||
it 'correctly processes posts and inserts them in timelines', :aggregate_failures do
|
||||
# Simulate a temporary failure preventing from fetching the parent post
|
||||
stub_request(:get, object_json[:id]).to_return(status: 500)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue