diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-13 00:00:35 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-14 17:09:31 +0300 |
commit | a8c836c371cb253d5e611a1080cd54f9cf4698e9 (patch) | |
tree | 25fdf1cb9cda597ea9a2fcca25baebfc0008e629 /spec/support/matchers | |
parent | 765a2c73271cf311311c391e7e64f83e141c79ae (diff) |
Add tests for the wiki pipeline
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/markdown_matchers.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb index b251e7f8f23..1d5c9f6cca4 100644 --- a/spec/support/matchers/markdown_matchers.rb +++ b/spec/support/matchers/markdown_matchers.rb @@ -66,6 +66,24 @@ module MarkdownMatchers end end + # GollumTagsFilter + matcher :parse_gollum_tags do + def have_image(src) + have_css("img[src*='#{src}']") + end + + set_default_markdown_messages + + match do |actual| + expect(actual).to have_link('linked-resource', href: 'linked-resource') + expect(actual).to have_link('link-text', href: 'linked-resource') + expect(actual).to have_link('http://example.com', href: 'http://example.com') + expect(actual).to have_link('link-text', href: 'http://example.com/pdfs/gollum.pdf') + expect(actual).to have_image('/namespace1/gitlabhq/wikis/images/example.jpg') + expect(actual).to have_image('http://example.com/images/example.jpg') + end + end + # UserReferenceFilter matcher :reference_users do set_default_markdown_messages |