Remote following success page (#4129)
* Added a success page to remote following Includes follow-through links to web (the old redirect target) and back to the remote user's profile * Use Account.new in spec instead of a fake with only id (fixes spec) * Fabricate(:account) over Account.new * Remove self from the success text (and all HTML with it)
This commit is contained in:
parent
d081d4a422
commit
7a889a8e12
5 changed files with 34 additions and 3 deletions
|
@ -94,7 +94,7 @@ describe AuthorizeFollowsController do
|
|||
end
|
||||
|
||||
it 'follows account when found' do
|
||||
target_account = double(id: '123')
|
||||
target_account = Fabricate(:account)
|
||||
result_account = double(target_account: target_account)
|
||||
service = double
|
||||
allow(FollowService).to receive(:new).and_return(service)
|
||||
|
@ -103,7 +103,7 @@ describe AuthorizeFollowsController do
|
|||
post :create, params: { acct: 'acct:user@hostname' }
|
||||
|
||||
expect(service).to have_received(:call).with(account, 'user@hostname')
|
||||
expect(response).to redirect_to(web_url('accounts/123'))
|
||||
expect(response).to render_template(:success)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue