0
0
Fork 0

Fix local follows, 404 in logs

This commit is contained in:
Eugen Rochko 2016-09-08 02:40:51 +02:00
parent 0f4bc56719
commit 509c18eb13
7 changed files with 28 additions and 11 deletions

View file

@ -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)