summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-06-25 07:56:56 +0000
committerRémy Coutable <remy@rymai.me>2018-06-25 07:56:56 +0000
commitff9b99ca5ae83c92e95100f5999bcb00c59148b0 (patch)
tree42dd3fb9951dd6b912888b0c7ca584b1e15673c2
parentdd71b5a22c9cdadabc33697f89e9bd5d87a36e09 (diff)
parent59cb05c8b4abedb49dfa4e896d29832c0b2ffdbb (diff)
downloadgitlab-ce-ff9b99ca5ae83c92e95100f5999bcb00c59148b0.tar.gz
Merge branch '45575-test-invalid-characters-signup' into 'master'
Add test for "Bug: When creating an account with invalid characters the error is "Username already taken" not "Invalid characters used"" See merge request gitlab-org/gitlab-ce!20124
-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