0
0
Fork 0

Reduce factory usage across spec/services area (#32098)

This commit is contained in:
Matt Jankowski 2024-10-04 10:11:15 -04:00 committed by GitHub
parent 4fe7f213a6
commit e4e07b1c34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 567 additions and 641 deletions

View file

@ -26,15 +26,16 @@ RSpec.describe BlockService do
before do
stub_request(:post, 'http://example.com/inbox').to_return(status: 200)
end
it 'creates a blocking relation and send block activity', :inline_jobs do
subject.call(sender, bob)
end
it 'creates a blocking relation' do
expect(sender.blocking?(bob)).to be true
end
expect(sender)
.to be_blocking(bob)
it 'sends a block activity', :inline_jobs do
expect(a_request(:post, 'http://example.com/inbox')).to have_been_made.once
expect(a_request(:post, 'http://example.com/inbox'))
.to have_been_made.once
end
end
end