Sha256: 866e80a0d568fc98e701b0ddde819e6a35cf55870b0af96c22fde6df7ddce77a

Contents?: true

Size: 556 Bytes

Versions: 9

Compression:

Stored size: 556 Bytes

Contents

describe 'spotlight/sir_trevor/blocks/_iframe_block.html.erb', type: :view do
  let(:p) { 'spotlight/sir_trevor/blocks/iframe_block.html.erb' }
  let(:block) do
    OpenStruct.new
  end

  it 'renders iframes' do
    block.code = "<iframe src='xyz'></iframe>"
    render partial: p, locals: { iframe_block: block }
    expect(rendered).to have_selector 'iframe[src="xyz"]'
  end

  it 'strips extra markup from the code' do
    block.code = '<a><b></b></a>'
    render partial: p, locals: { iframe_block: block }
    expect(rendered).to be_blank
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.4.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.3.3 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.3.2 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.3.1 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.3.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.2.1 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.2.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-2.1.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb