Adds test to cover the fix in #45575

This commit is contained in:
Sanad Liaquat 2018-06-24 15:51:07 +05:00
parent 2bac2918b2
commit 59cb05c8b4
1 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,15 @@ describe 'Signup' do
expect(find('.username')).to have_css '.gl-field-error-outline'
end
it 'shows an error message on submit if the username contains special characters' do
fill_in 'new_user_username', with: 'new$user!username'
wait_for_requests
click_button "Register"
expect(page).to have_content("Please create a username with only alphanumeric characters.")
end
end
context 'with no errors' do