diff options
author | Airat Shigapov <contact@airatshigapov.com> | 2016-10-14 20:52:10 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-10-26 14:09:04 +0300 |
commit | 45bfff3d664318d5e1e5c23165ab5832ddd54af9 (patch) | |
tree | 99b72c1ae2ec84162b6016fcbf8b5707cb878afa /spec/features/merge_requests/filter_by_milestone_spec.rb | |
parent | 4482d19959616b1fe2f509d9d85d7725bbedc08b (diff) |
Escape quotes in gl_dropdown values to prevent exceptions
Diffstat (limited to 'spec/features/merge_requests/filter_by_milestone_spec.rb')
-rw-r--r-- | spec/features/merge_requests/filter_by_milestone_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/merge_requests/filter_by_milestone_spec.rb b/spec/features/merge_requests/filter_by_milestone_spec.rb index d917d5950ec..f6e9230c8da 100644 --- a/spec/features/merge_requests/filter_by_milestone_spec.rb +++ b/spec/features/merge_requests/filter_by_milestone_spec.rb @@ -67,6 +67,23 @@ feature 'Merge Request filtering by Milestone', feature: true do expect(page).to have_css('.merge-request', 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(:merge_request, :with_diffs, source_project: project, milestone: milestone) + create(:merge_request, :simple, source_project: project) + + visit_merge_requests(project) + filter_by_milestone(milestone.title) + + expect(page).to have_issuable_counts(open: 1, closed: 0, all: 1) + expect(page).to have_css('.merge-request', count: 1) + end + end + def visit_merge_requests(project) visit namespace_project_merge_requests_path(project.namespace, project) end |