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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-28 00:08:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-28 00:08:45 +0300
commitd440531cf8d33834541da20aa2427c726d39e5ef (patch)
treefbb1f5a8f61d6afdb9b102fb241110d42f4feeb2 /spec/lib/banzai/pipeline
parentf3b9e205bb8dc4f0e8ebff79cf364fede886014b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/banzai/pipeline')
-rw-r--r--spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb b/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb
new file mode 100644
index 00000000000..fc74c592867
--- /dev/null
+++ b/spec/lib/banzai/pipeline/pre_process_pipeline_spec.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Banzai::Pipeline::PreProcessPipeline do
+ it 'pre-processes the source text' do
+ markdown = <<~MD
+ \xEF\xBB\xBF---
+ foo: :foo_symbol
+ bar: :bar_symbol
+ ---
+
+ >>>
+ blockquote
+ >>>
+ MD
+
+ result = described_class.call(markdown, {})
+
+ aggregate_failures do
+ expect(result[:output]).not_to include "\xEF\xBB\xBF"
+ expect(result[:output]).not_to include '---'
+ expect(result[:output]).to include "```yaml\nfoo: :foo_symbol\n"
+ expect(result[:output]).to include "> blockquote\n"
+ end
+ end
+end