Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/banzai/pipeline')
-rw-r--r--spec/lib/banzai/pipeline/full_pipeline_spec.rb1
-rw-r--r--spec/lib/banzai/pipeline/gfm_pipeline_spec.rb28
-rw-r--r--spec/lib/banzai/pipeline/wiki_pipeline_spec.rb2
3 files changed, 2 insertions, 29 deletions
diff --git a/spec/lib/banzai/pipeline/full_pipeline_spec.rb b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
index 0127ac11c81..9391ca386cf 100644
--- a/spec/lib/banzai/pipeline/full_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/full_pipeline_spec.rb
@@ -109,6 +109,7 @@ RSpec.describe Banzai::Pipeline::FullPipeline do
# Header
MARKDOWN
end
+
let(:invalid_markdown) do
<<-MARKDOWN.strip_heredoc
test [[_TOC_]]
diff --git a/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb b/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
index beb760637b0..247f4591632 100644
--- a/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
@@ -30,34 +30,6 @@ RSpec.describe Banzai::Pipeline::GfmPipeline do
described_class.call(markdown, project: project)
end
- context "with update_nodes_for_banzai_reference_filter feature flag disabled" do
- before do
- stub_feature_flags(update_nodes_for_banzai_reference_filter: false)
- end
-
- context 'when shorthand pattern #ISSUE_ID is used' do
- it 'links an internal issues and doesnt store nodes in result[:reference_filter_nodes]', :aggregate_failures do
- issue = create(:issue, project: project)
- markdown = "text #{issue.to_reference(project, full: true)}"
- result = described_class.call(markdown, project: project)
- link = result[:output].css('a').first
-
- expect(link['href']).to eq(Gitlab::Routing.url_helpers.project_issue_path(project, issue))
- expect(result[:reference_filter_nodes]).to eq nil
- end
- end
-
- it 'execute :each_node for each reference_filter', :aggregate_failures do
- issue = create(:issue, project: project)
- markdown = "text #{issue.to_reference(project, full: true)}"
- described_class.reference_filters do |reference_filter|
- expect_any_instance_of(reference_filter).to receive(:each_node).once
- end
-
- described_class.call(markdown, project: project)
- end
- end
-
context 'when shorthand pattern #ISSUE_ID is used' do
it 'links an internal issue if it exists' do
issue = create(:issue, project: project)
diff --git a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
index 4af782c7d73..b102de24041 100644
--- a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Banzai::Pipeline::WikiPipeline do
let_it_be(:namespace) { create(:namespace, name: "wiki_link_ns") }
let_it_be(:project) { create(:project, :public, name: "wiki_link_project", namespace: namespace) }
- let_it_be(:wiki) { ProjectWiki.new(project, double(:user)) }
+ let_it_be(:wiki) { ProjectWiki.new(project, nil) }
let_it_be(:page) { build(:wiki_page, wiki: wiki, title: 'nested/twice/start-page') }
describe 'TableOfContents' do