FIX: Prepend the user id before username in admin user routes

This commit is contained in:
Erick Guan
2015-09-26 15:56:36 +02:00
parent b2ffaa0822
commit 35142847ba
9 changed files with 16 additions and 17 deletions

View File

@ -47,14 +47,14 @@ describe Admin::UsersController do
describe '.show' do
context 'an existing user' do
it 'returns success' do
xhr :get, :show, id: @user.username
xhr :get, :show, id: @user.id
expect(response).to be_success
end
end
context 'an existing user' do
it 'returns success' do
xhr :get, :show, id: 'foobar'
xhr :get, :show, id: 0
expect(response).not_to be_success
end
end