about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorSTJrInuyasha <MattWCSTRFAN@gmail.com>2017-07-10 09:05:06 -0700
committerEugen Rochko <eugen@zeonfederated.com>2017-07-10 18:05:06 +0200
commit7a889a8e125a03e109b225cd83b0abcbdc76d95b (patch)
tree52aeb321afcb04bbeb6fa0c61a5ae8eec700d1cf /spec
parentd081d4a4226ba317a1b653aa6eef57543cbe4430 (diff)
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)
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/authorize_follows_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/authorize_follows_controller_spec.rb b/spec/controllers/authorize_follows_controller_spec.rb
index b801aa661..26e46a23c 100644
--- a/spec/controllers/authorize_follows_controller_spec.rb
+++ b/spec/controllers/authorize_follows_controller_spec.rb
@@ -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