about summary refs log tree commit diff
path: root/spec/controllers/authorize_follows_controller_spec.rb
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-28 09:12:37 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-04-28 15:12:37 +0200
commit9566893cc973671f151ceabf266d260ebba57492 (patch)
tree1f575905b552ba758a08300b96c91122e3ef6dc4 /spec/controllers/authorize_follows_controller_spec.rb
parent0e2589867f2a54fe9a71c20560d90d7f77c12bd3 (diff)
More controller specs (#2561)
* Add render_views in more places

* Delegate methods from account to user with allow nil true, so that admin accounts show view renders when missing a user

* Use actual account instances in authorize follow controller spec
Diffstat (limited to 'spec/controllers/authorize_follows_controller_spec.rb')
-rw-r--r--spec/controllers/authorize_follows_controller_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/controllers/authorize_follows_controller_spec.rb b/spec/controllers/authorize_follows_controller_spec.rb
index f65b620cc..87a46cf8e 100644
--- a/spec/controllers/authorize_follows_controller_spec.rb
+++ b/spec/controllers/authorize_follows_controller_spec.rb
@@ -3,6 +3,8 @@
 require 'rails_helper'
 
 describe AuthorizeFollowsController do
+  render_views
+
   describe 'GET #show' do
     describe 'when signed out' do
       it 'redirects to sign in page' do
@@ -38,7 +40,7 @@ describe AuthorizeFollowsController do
       end
 
       it 'sets account from url' do
-        account = double
+        account = Account.new
         service = double
         allow(FetchRemoteAccountService).to receive(:new).and_return(service)
         allow(service).to receive(:call).with('http://example.com').and_return(account)
@@ -50,7 +52,7 @@ describe AuthorizeFollowsController do
       end
 
       it 'sets account from acct uri' do
-        account = double
+        account = Account.new
         service = double
         allow(FollowRemoteAccountService).to receive(:new).and_return(service)
         allow(service).to receive(:call).with('found@hostname').and_return(account)