diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-14 09:59:06 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-14 09:59:06 +0000 |
commit | 006c163b53d062d990ac213deac70978b0a927cc (patch) | |
tree | 36dced4c3ba22fa3449e4b09c05bfa07a7eda003 /spec | |
parent | b44237f576e47b38299fab5a6d28aa49bc63970e (diff) | |
parent | af941732ed92ad44a7568964e2a9191d0c72164c (diff) | |
download | gitlab-ce-006c163b53d062d990ac213deac70978b0a927cc.tar.gz |
Merge branch 'repository-name-emojis' into 'master'
Added ability to put emojis into repository name
## Are there points in the code the reviewer needs to double check?
Ensure that regexp used is correct, I used the following list: http://www.unicode.org/Public/emoji/1.0/emoji-data.txt
See merge request !7420
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/project_settings_spec.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/features/projects/project_settings_spec.rb b/spec/features/projects/project_settings_spec.rb index 3de25d7af7d..bf60cca4ea4 100644 --- a/spec/features/projects/project_settings_spec.rb +++ b/spec/features/projects/project_settings_spec.rb @@ -18,7 +18,7 @@ describe 'Edit Project Settings', feature: true do click_button 'Save changes' expect(page).to have_field 'project_name_edit', with: 'foo&bar' - expect(page).to have_content "Name can contain only letters, digits, '_', '.', dash and space. It must start with letter, digit or '_'." + expect(page).to have_content "Name can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'." expect(page).to have_button 'Save changes' end end @@ -34,8 +34,21 @@ describe 'Edit Project Settings', feature: true do expect(page).to have_field 'Project name', with: 'foo&bar' expect(page).to have_field 'Path', with: 'foo&bar' - expect(page).to have_content "Name can contain only letters, digits, '_', '.', dash and space. It must start with letter, digit or '_'." + expect(page).to have_content "Name can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'." expect(page).to have_content "Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'" end end + + describe 'Rename repository name with emojis' do + it 'shows error for invalid project name' do + visit edit_namespace_project_path(project.namespace, project) + + fill_in 'Project name', with: '🚀 foo bar ☁️' + + click_button 'Rename project' + + expect(page).to have_field 'Project name', with: '🚀 foo bar ☁️' + expect(page).not_to have_content "Name can contain only letters, digits, emojis '_', '.', dash and space. It must start with letter, digit, emoji or '_'." + end + end end |