summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanad Liaquat <sanadliaquat@moduscreate.com>2018-06-24 15:51:07 +0500
committerSanad Liaquat <sanadliaquat@moduscreate.com>2018-06-24 15:51:07 +0500
commit59cb05c8b4abedb49dfa4e896d29832c0b2ffdbb (patch)
treecd5db0549d65fd8d3356c9d1d0136e6e079e5558
parent2bac2918b2d6f12d94f739f4b6865b9e9221c642 (diff)
downloadgitlab-ce-59cb05c8b4abedb49dfa4e896d29832c0b2ffdbb.tar.gz
Adds test to cover the fix in #45575
-rw-r--r--spec/features/users/signup_spec.rb9
1 files changed, 9 insertions, 0 deletions
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