mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Prepend the user id before username in admin user routes
This commit is contained in:
parent
b2ffaa0822
commit
35142847ba
9 changed files with 16 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue