Reduce factory usage across spec/services
area (#32098)
This commit is contained in:
parent
4fe7f213a6
commit
e4e07b1c34
21 changed files with 567 additions and 641 deletions
|
@ -143,15 +143,16 @@ RSpec.describe FollowService do
|
|||
|
||||
before do
|
||||
stub_request(:post, 'http://example.com/inbox').to_return(status: 200, body: '', headers: {})
|
||||
end
|
||||
|
||||
it 'creates follow request and sends an activity to inbox', :inline_jobs do
|
||||
subject.call(sender, bob)
|
||||
end
|
||||
|
||||
it 'creates follow request' do
|
||||
expect(FollowRequest.find_by(account: sender, target_account: bob)).to_not be_nil
|
||||
end
|
||||
expect(FollowRequest.find_by(account: sender, target_account: bob))
|
||||
.to_not be_nil
|
||||
|
||||
it 'sends a follow activity to the inbox', :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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue