diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-06-08 10:32:50 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-06-09 10:15:01 +0530 |
commit | e6b1d1669b362ad4cea27ac44e89e73f4d6e92fd (patch) | |
tree | c95b552cb18d42067161429cc738a40a3794b467 /features | |
parent | 8e71c19a6940b8d82c70ee9b2550b62b5169eb54 (diff) | |
download | gitlab-ce-e6b1d1669b362ad4cea27ac44e89e73f4d6e92fd.tar.gz |
Hook up the updated `WikiLinkFilter` to the wiki controllers.
- Need to pass in a `page_slug` to the filter, so it can rewrite based
on the current page (all links are rewritten to the level of the app root).
- The earlier `markdown_preview` endpoint was at the level of the wiki.
We need to know the current page (for rewriting, as above), so this
commit moves the endpoint to the level of a wiki page.
- Fix all tests
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/wiki.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 9f6aed1c5b9..3cbf832c728 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -97,7 +97,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps file = Gollum::File.new(wiki.wiki) Gollum::Wiki.any_instance.stub(:file).with("image.jpg", "master", true).and_return(file) Gollum::File.any_instance.stub(:mime_type).and_return("image/jpeg") - expect(page).to have_link('image', href: "image.jpg") + expect(page).to have_link('image', href: "#{wiki.wiki_base_path}/image.jpg") click_on "image" end @@ -113,7 +113,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I click on image link' do - expect(page).to have_link('image', href: "image.jpg") + expect(page).to have_link('image', href: "#{wiki.wiki_base_path}/image.jpg") click_on "image" end |