Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-06-08 08:02:50 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-06-09 07:45:01 +0300
commite6b1d1669b362ad4cea27ac44e89e73f4d6e92fd (patch)
treec95b552cb18d42067161429cc738a40a3794b467 /spec/support
parent8e71c19a6940b8d82c70ee9b2550b62b5169eb54 (diff)
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 'spec/support')
-rw-r--r--spec/support/markdown_feature.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/markdown_feature.rb b/spec/support/markdown_feature.rb
index 7fc6d6fcc5e..a79386b5db9 100644
--- a/spec/support/markdown_feature.rb
+++ b/spec/support/markdown_feature.rb
@@ -32,6 +32,10 @@ class MarkdownFeature
@project_wiki ||= ProjectWiki.new(project, user)
end
+ def project_wiki_page
+ @project_wiki_page ||= build(:wiki_page, wiki: project_wiki)
+ end
+
def issue
@issue ||= create(:issue, project: project)
end