summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-06-01 15:51:59 +0000
committerDouwe Maan <douwe@gitlab.com>2016-06-01 15:51:59 +0000
commit2d084dd8481417ba8031a378d68009738d076229 (patch)
tree6c91c3ce35a66bdd1fa1d7806da51968d564ad73 /spec/support
parentef6fe42ec05d40935154d2bb22a44fdb7d1eac8e (diff)
parent580d250166d97bd5c2b0526be737d02806e577c2 (diff)
downloadgitlab-ce-2d084dd8481417ba8031a378d68009738d076229.tar.gz
Merge branch 'separate-banzai-references' into 'master'
Separate reference gathering from rendering This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query. cc @rspeicher @DouweM See merge request !3969
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/filter_spec_helper.rb3
-rw-r--r--spec/support/reference_parser_helpers.rb5
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/filter_spec_helper.rb b/spec/support/filter_spec_helper.rb
index e849a9633b9..a8e454eb09e 100644
--- a/spec/support/filter_spec_helper.rb
+++ b/spec/support/filter_spec_helper.rb
@@ -40,8 +40,7 @@ module FilterSpecHelper
filters = [
Banzai::Filter::AutolinkFilter,
- described_class,
- Banzai::Filter::ReferenceGathererFilter
+ described_class
]
HTML::Pipeline.new(filters, context)
diff --git a/spec/support/reference_parser_helpers.rb b/spec/support/reference_parser_helpers.rb
new file mode 100644
index 00000000000..01689194eac
--- /dev/null
+++ b/spec/support/reference_parser_helpers.rb
@@ -0,0 +1,5 @@
+module ReferenceParserHelpers
+ def empty_html_link
+ Nokogiri::HTML.fragment('<a></a>').children[0]
+ end
+end