Sha256: 92f3857ae03c69e5ec36f5cbe0056f9bb4e598975936b98b35e646c1347c7ac9
Contents?: true
Size: 871 Bytes
Versions: 9
Compression:
Stored size: 871 Bytes
Contents
require 'spec_helper' describe 'alchemy/essences/_essence_richtext_view' do let(:essence) { Alchemy::EssenceRichtext.new(body: '<h1>Lorem ipsum dolor sit amet</h1> <p>consectetur adipiscing elit.</p>', stripped_body: 'Lorem ipsum dolor sit amet consectetur adipiscing elit.') } let(:content) { Alchemy::Content.new(essence: essence) } it "renders the html body" do render content, content: content expect(rendered).to have_content('Lorem ipsum dolor sit amet consectetur adipiscing elit.') expect(rendered).to have_selector('h1') end context 'with options[:plain_text] true' do it "renders the text body" do render content, content: content, options: {plain_text: true} expect(rendered).to have_content('Lorem ipsum dolor sit amet consectetur adipiscing elit.') expect(rendered).to_not have_selector('h1') end end end
Version data entries
9 entries across 9 versions & 1 rubygems