diff options
author | Airat Shigapov <contact@airatshigapov.com> | 2016-10-14 20:52:10 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-10-26 12:09:04 +0100 |
commit | 45bfff3d664318d5e1e5c23165ab5832ddd54af9 (patch) | |
tree | 99b72c1ae2ec84162b6016fcbf8b5707cb878afa /spec/features/issues | |
parent | 4482d19959616b1fe2f509d9d85d7725bbedc08b (diff) | |
download | gitlab-ce-45bfff3d664318d5e1e5c23165ab5832ddd54af9.tar.gz |
Escape quotes in gl_dropdown values to prevent exceptions
Diffstat (limited to 'spec/features/issues')
-rw-r--r-- | spec/features/issues/filter_by_milestone_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/issues/filter_by_milestone_spec.rb b/spec/features/issues/filter_by_milestone_spec.rb index 485dc560061..88e1549a22b 100644 --- a/spec/features/issues/filter_by_milestone_spec.rb +++ b/spec/features/issues/filter_by_milestone_spec.rb @@ -58,6 +58,22 @@ feature 'Issue filtering by Milestone', feature: true do expect(page).to have_css('.issue', count: 1) end + context 'when milestone has single quotes in title' do + background do + milestone.update(name: "rock 'n' roll") + end + + scenario 'filters by a specific Milestone', js: true do + create(:issue, project: project, milestone: milestone) + create(:issue, project: project) + + visit_issues(project) + filter_by_milestone(milestone.title) + + expect(page).to have_css('.issue', count: 1) + end + end + def visit_issues(project) visit namespace_project_issues_path(project.namespace, project) end |