diff --git a/app/views/catalog/_index_list_default.html.erb b/app/views/catalog/_index_list_default.html.erb index fd6bbb29b..39329f4be 100644 --- a/app/views/catalog/_index_list_default.html.erb +++ b/app/views/catalog/_index_list_default.html.erb @@ -1,39 +1,40 @@ <%# OVERRIDE Hyrax 5.0.1 to enable markdown for index field values in search results %> <%# OVERRIDE Hyrax 5.0.1 to handle search only accounts %> -
bold
\n") + context 'when treat_some_user_inputs_as_markdown is true' do + it 'renders markdown into html' do + allow(Flipflop).to receive(:treat_some_user_inputs_as_markdown?).and_return(true) + + expect(helper.markdown(header)).to eq("bold
\n") + end + end + + context 'when treat_some_user_inputs_as_markdown is false' do + it 'does not render markdown into html' do + allow(Flipflop).to receive(:treat_some_user_inputs_as_markdown?).and_return(false) + + expect(helper.markdown(header)).to eq('# header') + expect(helper.markdown(bold)).to eq('*bold*') + end end end