Skip to content

Commit

Permalink
[frontend] added missing testcases for user_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira authored and bgeuken committed Mar 26, 2018
1 parent 506f56a commit 414d56f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/api/spec/controllers/webui/user_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,21 @@
end

describe 'GET #autocomplete' do
skip
let!(:user) { create(:user, login: 'foobar') }

it 'returns user login' do
get :autocomplete, params: { term: 'foo', format: :json }
expect(JSON.parse(response.body)).to match_array(['foobar'])
end
end

describe 'GET #tokens' do
skip
let!(:user) { create(:user, login: 'foobaz') }

it 'returns user token as array of hash' do
get :tokens, params: { q: 'foo', format: :json }
expect(JSON.parse(response.body)).to match_array(['name' => 'foobaz'])
end
end

describe 'GET #notifications' do
Expand Down

0 comments on commit 414d56f

Please sign in to comment.