From 1f3b410bcf639792b08c6d0c4a1b3499390b55ce Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 24 Apr 2017 14:57:11 +0300 Subject: Fix outdated specs that were not executed due to wrong filename Signed-off-by: Dmitriy Zaporozhets --- .../create_issue_for_single_discussion_in_merge_request_spec.rb | 6 +++--- spec/lib/gitlab/other_markup_spec.rb | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb index 88e2cc60d79..3a5a79e03f4 100644 --- a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb +++ b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb @@ -4,7 +4,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe let(:user) { create(:user) } let(:project) { create(:project, only_allow_merge_if_all_discussions_are_resolved: true) } let(:merge_request) { create(:merge_request, source_project: project) } - let!(:discussion) { Discussion.for_diff_notes([create(:diff_note_on_merge_request, noteable: merge_request, project: project)]).first } + let!(:discussion) { create(:diff_note_on_merge_request, noteable: merge_request, project: project).to_discussion } describe 'As a user with access to the project' do before do @@ -74,8 +74,8 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe it 'Shows a notice to ask someone else to resolve the discussions' do expect(page).to have_content("The discussion at #{merge_request.to_reference}"\ - "(discussion #{discussion.first_note.id}) will stay unresolved."\ - "Ask someone with permission to resolve it.") + " (discussion #{discussion.first_note.id}) will stay unresolved."\ + " Ask someone with permission to resolve it.") end end end diff --git a/spec/lib/gitlab/other_markup_spec.rb b/spec/lib/gitlab/other_markup_spec.rb index 8f5a353b381..22e80ec46be 100644 --- a/spec/lib/gitlab/other_markup_spec.rb +++ b/spec/lib/gitlab/other_markup_spec.rb @@ -1,12 +1,14 @@ require 'spec_helper' describe Gitlab::OtherMarkup, lib: true do + let(:context) { {} } + context "XSS Checks" do links = { 'links' => { file: 'file.rdoc', input: 'XSS[JaVaScriPt:alert(1)]', - output: '

XSS

' + output: "\n" + '

XSS

' + "\n" } } links.each do |name, data| -- cgit v1.2.1