From 829d189f44f1c8bdfc3aa60aa4ae2f477c72edad Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 3 Nov 2016 18:53:37 +0100 Subject: Add tests for recently added API end points --- spec/controllers/api/v1/accounts_controller_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec/controllers/api/v1/accounts_controller_spec.rb') diff --git a/spec/controllers/api/v1/accounts_controller_spec.rb b/spec/controllers/api/v1/accounts_controller_spec.rb index e4532305b..98eea28ce 100644 --- a/spec/controllers/api/v1/accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts_controller_spec.rb @@ -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 } -- cgit