diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-08-15 15:51:29 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-05 09:19:16 -0500 |
commit | 5a7451c2f91e5ed7fa95f6abb5eaceaf220945cb (patch) | |
tree | 1b99fe086f74e42e997a6b8bbf2f3962298685ef /spec/helpers | |
parent | bd807fe0a69fdc53c7423bea8f24e73080fbada6 (diff) | |
download | gitlab-ce-5a7451c2f91e5ed7fa95f6abb5eaceaf220945cb.tar.gz |
Enable CommonMark for files and wikis
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/markup_helper_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb index 36e86c68394..8c33920d743 100644 --- a/spec/helpers/markup_helper_spec.rb +++ b/spec/helpers/markup_helper_spec.rb @@ -207,7 +207,7 @@ describe MarkupHelper do expect(helper).to receive(:markdown_unsafe).with('wiki content', pipeline: :wiki, project: project, project_wiki: @wiki, page_slug: "nested/page", - issuable_state_filter_enabled: true, markdown_engine: :redcarpet) + issuable_state_filter_enabled: true) helper.render_wiki_content(@wiki) end @@ -259,10 +259,12 @@ describe MarkupHelper do expect(helper.markup('foo.md', content, rendered: '<p>NOEL</p>')).to eq('<p>NOEL</p>') end - it 'defaults to Redcarpet' do - expect(helper).to receive(:markdown_unsafe).with(content, hash_including(markdown_engine: :redcarpet)).and_return('NOEL') + it 'defaults to CommonMark' do + expect(helper.markup('foo.md', 'x^2')).to include('x^2') + end - expect(helper.markup('foo.md', content)).to eq('NOEL') + it 'honors markdown_engine for RedCarpet' do + expect(helper.markup('foo.md', 'x^2', { markdown_engine: :redcarpet })).to include('x<sup>2</sup>') end end |