Sha256: e3f2e78741197185fef25bc7287e706ac8b21438450a636a7727da929a55c7fe

Contents?: true

Size: 769 Bytes

Versions: 7

Compression:

Stored size: 769 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::Type::Html do
  before do
    Card::Auth.current_id = Card::WagnBotID
  end

  it 'has special editor' do
    assert_view_select render_editor('Html'), 'textarea[rows="5"]'
  end

  it 'does not render any content in closed view' do
    rendered = render_card :closed_content,
                           type: 'Html',
                           content: '<strong>Lions and Tigers</strong>'
    expect(rendered).to eq('')
  end

  it 'renders nests' do
    rendered = render_card :core, type: 'HTML', content: '{{a}}'
    expect(rendered).to match(/slot/)
  end

  it 'does not render uris' do
    rendered = render_card :core, type: 'HTML', content: 'http://google.com'
    expect(rendered).not_to match(/\<a/)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
card-1.18.6 mod/05_standard/spec/set/type/html_spec.rb
card-1.18.5 mod/05_standard/spec/set/type/html_spec.rb
card-1.18.4 mod/05_standard/spec/set/type/html_spec.rb
card-1.18.3 mod/05_standard/spec/set/type/html_spec.rb
card-1.18.2 mod/05_standard/spec/set/type/html_spec.rb
card-1.18.1 mod/05_standard/spec/set/type/html_spec.rb
card-1.18.0 mod/05_standard/spec/set/type/html_spec.rb