diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-24 16:43:07 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-24 16:43:07 +0300 |
commit | 989131c530f06fc52e9212df1e3e8d48eae4902f (patch) | |
tree | f71d989c7aedba3bc4cb38bb1bf7607d181fb48b /spec/support | |
parent | 331154ffdf899a82c67487a70436ce49e494256b (diff) |
Render milestone links as references
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/markdown_feature.rb | 8 | ||||
-rw-r--r-- | spec/support/matchers/markdown_matchers.rb | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/spec/support/markdown_feature.rb b/spec/support/markdown_feature.rb index d6d3062a197..5d97fdd4882 100644 --- a/spec/support/markdown_feature.rb +++ b/spec/support/markdown_feature.rb @@ -59,6 +59,10 @@ class MarkdownFeature @label ||= create(:label, name: 'awaiting feedback', project: project) end + def milestone + @milestone ||= create(:milestone, project: project) + end + # Cross-references ----------------------------------------------------------- def xproject @@ -93,6 +97,10 @@ class MarkdownFeature end end + def xmilestone + @xmilestone ||= create(:milestone, project: xproject) + end + def urls Gitlab::Application.routes.url_helpers end diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb index 7eadcd58c1f..b251e7f8f23 100644 --- a/spec/support/matchers/markdown_matchers.rb +++ b/spec/support/matchers/markdown_matchers.rb @@ -130,6 +130,15 @@ module MarkdownMatchers end end + # MilestoneReferenceFilter + matcher :reference_milestones do + set_default_markdown_messages + + match do |actual| + expect(actual).to have_selector('a.gfm.gfm-milestone', count: 3) + end + end + # TaskListFilter matcher :parse_task_lists do set_default_markdown_messages |