summaryrefslogtreecommitdiff
path: root/spec/helpers/nav_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/nav_helper_spec.rb')
-rw-r--r--spec/helpers/nav_helper_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/helpers/nav_helper_spec.rb b/spec/helpers/nav_helper_spec.rb
index f92dca11136..ac1c6c62433 100644
--- a/spec/helpers/nav_helper_spec.rb
+++ b/spec/helpers/nav_helper_spec.rb
@@ -117,4 +117,27 @@ describe NavHelper, :do_not_mock_admin_mode do
it { is_expected.to all(be_a(String)) }
end
+
+ describe '#page_has_markdown?' do
+ using RSpec::Parameterized::TableSyntax
+
+ where path: %w(
+ merge_requests#show
+ projects/merge_requests/conflicts#show
+ issues#show
+ milestones#show
+ issues#designs
+ )
+
+ with_them do
+ before do
+ allow(helper).to receive(:current_path?).and_call_original
+ allow(helper).to receive(:current_path?).with(path).and_return(true)
+ end
+
+ subject { helper.page_has_markdown? }
+
+ it { is_expected.to eq(true) }
+ end
+ end
end