0
0
Fork 0

Add tests for recently added API end points

This commit is contained in:
Eugen Rochko 2016-11-03 18:53:37 +01:00
parent 3731230c6d
commit 829d189f44
3 changed files with 47 additions and 1 deletions

View file

@ -46,6 +46,20 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
end
describe 'GET #suggestions' do
it 'returns http success' do
get :suggestions
expect(response).to have_http_status(:success)
end
end
describe 'GET #common_followers' do
it 'returns http success' do
get :common_followers, params: { id: user.account.id }
expect(response).to have_http_status(:success)
end
end
describe 'POST #follow' do
let(:other_account) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account }