summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/pipeline/description_pipeline_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/banzai/pipeline/description_pipeline_spec.rb')
-rw-r--r--spec/lib/banzai/pipeline/description_pipeline_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/banzai/pipeline/description_pipeline_spec.rb b/spec/lib/banzai/pipeline/description_pipeline_spec.rb
index 5ecd3df5151..6778a273bba 100644
--- a/spec/lib/banzai/pipeline/description_pipeline_spec.rb
+++ b/spec/lib/banzai/pipeline/description_pipeline_spec.rb
@@ -3,12 +3,14 @@
require 'spec_helper'
describe Banzai::Pipeline::DescriptionPipeline do
+ let_it_be(:project) { create(:project) }
+
def parse(html)
# When we pass HTML to Redcarpet, it gets wrapped in `p` tags...
# ...except when we pass it pre-wrapped text. Rabble rabble.
unwrap = !html.start_with?('<p ')
- output = described_class.to_html(html, project: spy)
+ output = described_class.to_html(html, project: project)
output.gsub!(%r{\A<p dir="auto">(.*)</p>(.*)\z}, '\1\2') if unwrap