Sha256: fa397e3344dee748311eb63d4da1d5a21c5d042e15c699a3a8c99d5a7a7eb366

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/sir_trevor/blocks/_iframe_block.html.erb', type: :view do
  let(:p) { 'spotlight/sir_trevor/blocks/iframe_block' }
  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-3.4.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb