Fix to allow admins to change the case of a someone's username

This commit is contained in:
Neil Lalonde
2013-07-30 14:13:56 -04:00
parent 2f95f60e40
commit 16cd3e2a53
4 changed files with 17 additions and 6 deletions

View File

@ -802,6 +802,15 @@ describe UsersController do
end
include_examples 'when username is unavailable locally'
end
context "an admin changing it for someone else" do
let!(:user) { Fabricate(:user, username: 'hansolo') }
before do
log_in_user(Fabricate(:admin))
xhr :get, :check_username, username: 'HanSolo', for_user_id: user.id
end
include_examples 'when username is available everywhere'
end
end
end