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
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-07 14:26:05 +0300
committerDouwe Maan <douwe@gitlab.com>2016-01-07 14:26:05 +0300
commit539b41929bddf0e82d986f9e823208dd92707a21 (patch)
treeb63069557b6303a57ea36f33f1a80aa3618ec43d /spec
parentb38eabdaf69c4da19f39c26b7626e9ce4b51158b (diff)
Milestone reference is a Markdown link
Diffstat (limited to 'spec')
-rw-r--r--spec/fixtures/markdown.md.erb1
-rw-r--r--spec/lib/banzai/filter/milestone_reference_filter_spec.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/fixtures/markdown.md.erb b/spec/fixtures/markdown.md.erb
index 302b750aee5..0620096d689 100644
--- a/spec/fixtures/markdown.md.erb
+++ b/spec/fixtures/markdown.md.erb
@@ -219,7 +219,6 @@ References should be parseable even inside _<%= merge_request.to_reference %>_ e
- Milestone: <%= milestone.to_reference %>
- Milestone in another project: <%= xmilestone.to_reference(project) %>
- Ignored in code: `<%= milestone.to_reference %>`
-- Ignored in links: [Link to <%= milestone.to_reference %>](#milestone-link)
- Link to milestone by URL: [Milestone](<%= urls.namespace_project_milestone_url(milestone.project.namespace, milestone.project, milestone) %>)
### Task Lists
diff --git a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
index 86b71210100..ebf3d7489b5 100644
--- a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb
@@ -18,7 +18,9 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do
end
context 'internal reference' do
- let(:reference) { milestone.to_reference }
+ # Convert the Markdown link to only the URL, since these tests aren't run through the regular Markdown pipeline.
+ # Milestone reference behavior in the full Markdown pipeline is tested elsewhere.
+ let(:reference) { milestone.to_reference.gsub(/\[([^\]]+)\]\(([^)]+)\)/, '\2') }
it 'links to a valid reference' do
doc = reference_filter("See #{reference}")