From 509c18eb139ead0d2e2f02f580ef04b28d874f48 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 8 Sep 2016 02:40:51 +0200 Subject: Fix local follows, 404 in logs --- spec/controllers/api/accounts_controller_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/controllers') diff --git a/spec/controllers/api/accounts_controller_spec.rb b/spec/controllers/api/accounts_controller_spec.rb index d8b26f815..91e62837c 100644 --- a/spec/controllers/api/accounts_controller_spec.rb +++ b/spec/controllers/api/accounts_controller_spec.rb @@ -7,6 +7,7 @@ RSpec.describe Api::AccountsController, type: :controller do let(:token) { double acceptable?: true, resource_owner_id: user.id } before do + stub_request(:post, "https://pubsubhubbub.superfeedr.com/").to_return(:status => 200, :body => "", :headers => {}) allow(controller).to receive(:doorkeeper_token) { token } end @@ -39,7 +40,7 @@ RSpec.describe Api::AccountsController, type: :controller do end describe 'POST #follow' do - let(:other_account) { Fabricate(:account, username: 'bob') } + let(:other_account) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account } before do post :follow, params: { id: other_account.id } @@ -55,7 +56,7 @@ RSpec.describe Api::AccountsController, type: :controller do end describe 'POST #unfollow' do - let(:other_account) { Fabricate(:account, username: 'bob') } + let(:other_account) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account } before do user.account.follow!(other_account) -- cgit