about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-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)