diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-01 11:22:22 +0300 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-06 09:13:46 +0300 |
commit | 22055e10580ae93c2cb87956eefba0a06e9b50d0 (patch) | |
tree | 49691215a4fd7c001368f34277f0885ddb2915fa /spec/support/matchers | |
parent | 61fe0a23977749b0a5dba41ca26101b4a03de720 (diff) |
Fix a few edited references from WikiLinkFilter and specs
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/markdown_matchers.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb index 1d52489e804..43cb6ef43f2 100644 --- a/spec/support/matchers/markdown_matchers.rb +++ b/spec/support/matchers/markdown_matchers.rb @@ -13,7 +13,7 @@ module MarkdownMatchers set_default_markdown_messages match do |actual| - link = actual.at_css('a:contains("Relative Link")') + link = actual.at_css('a:contains("Relative Link")') image = actual.at_css('img[alt="Relative Image"]') expect(link['href']).to end_with('master/doc/README.md') @@ -72,14 +72,15 @@ module MarkdownMatchers have_css("img[src$='#{src}']") end + prefix = '/namespace1/gitlabhq/wikis' 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('linked-resource', href: "#{prefix}/linked-resource") + expect(actual).to have_link('link-text', href: "#{prefix}/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('/gitlabhq/wikis/images/example.jpg') + expect(actual).to have_image("#{prefix}/images/example.jpg") expect(actual).to have_image('http://example.com/images/example.jpg') end end |