diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-04 08:42:23 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-05 09:19:16 -0500 |
commit | 589776fc2e421df12c2526f9cf8cd7f3f239a21f (patch) | |
tree | 932f66852aac6362cae5075ef8878cf160ddd19a /spec | |
parent | a963721f797b451efec15702e73752c8b8830631 (diff) | |
download | gitlab-ce-589776fc2e421df12c2526f9cf8cd7f3f239a21f.tar.gz |
move logic into legacy_render_context helper method
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index cbd4ff0fb4a..976b6c312b4 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -470,4 +470,16 @@ describe ProjectsHelper do end end end + + describe '#legacy_render_context' do + it 'returns the redcarpet engine' do + params = { legacy_render: '1' } + + expect(helper.legacy_render_context(params)).to include(markdown_engine: :redcarpet) + end + + it 'returns nothing' do + expect(helper.legacy_render_context({})).to be_empty + end + end end |