From 59cb05c8b4abedb49dfa4e896d29832c0b2ffdbb Mon Sep 17 00:00:00 2001 From: Sanad Liaquat Date: Sun, 24 Jun 2018 15:51:07 +0500 Subject: Adds test to cover the fix in #45575 --- spec/features/users/signup_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb index b51ca5d130b..bfe11ddf673 100644 --- a/spec/features/users/signup_spec.rb +++ b/spec/features/users/signup_spec.rb @@ -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 -- cgit v1.2.1