about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-08 02:40:51 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-08 02:40:51 +0200
commit509c18eb139ead0d2e2f02f580ef04b28d874f48 (patch)
treecb87396ee928a5d9bc349e15846d54179f7e2dbd /spec/controllers
parent0f4bc567195d368de596cdeeee6bc0b6507ae95e (diff)
Fix local follows, 404 in logs
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/api/accounts_controller_spec.rb5
1 files changed, 3 insertions, 2 deletions
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)