From 9566893cc973671f151ceabf266d260ebba57492 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 28 Apr 2017 09:12:37 -0400 Subject: 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 --- spec/controllers/authorize_follows_controller_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'spec/controllers/authorize_follows_controller_spec.rb') 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) -- cgit