Sha256: a93be87dbff57167c94d04e529e13b56f397894a18adec21db5f22a1b59a64ea
Contents?: true
Size: 790 Bytes
Versions: 10
Compression:
Stored size: 790 Bytes
Contents
# coding: utf-8 describe '/_flash_msg.html.erb', type: :view do before do allow(view).to receive(:flash).and_return(flash) end let(:flash) { { notice: notice } } let(:i18n_html) { t('hyrax.works.create.after_create_html', application_name: 'Whatever') } context 'with a single flash notice' do let(:notice) { i18n_html } it 'renders with HTML unescaped' do render expect(rendered).not_to have_content '</span>' end end context 'with multiple flash notices' do let(:notice) do [ i18n_html, 'Lorem ipsum!' ] end it 'renders the notice joined with unescaped line break' do render expect(rendered).not_to have_content '<br/>' expect(rendered).not_to have_content '</span>' end end end
Version data entries
10 entries across 10 versions & 2 rubygems