Sha256: 8d47b2230c660b8a6a760e7b1a74e290d2db4bb8a984c272befe367ac33692c9

Contents?: true

Size: 1.42 KB

Versions: 24

Compression:

Stored size: 1.42 KB

Contents

require 'spec_helper'

describe SemanticIconHelper do
  it 'render icon with name' do
    render plain: semantic_icon('add')
    assert_select 'i[class="add icon"]'
  end

  it 'render icon with names with string' do
    render plain: semantic_icon('add sign')
    assert_select 'i[class="add sign icon"]'
  end

  it 'render icon with names with params' do
    render plain: semantic_icon('add', 'sign')
    assert_select 'i[class="add sign icon"]'
  end

  it 'render icon with names with sym params' do
    render plain: semantic_icon(:add, :sign)
    assert_select 'i[class="add sign icon"]'
  end

  it 'render icon with name and id' do
    render plain: semantic_icon('add', id: 'id')
    assert_select 'i[class="add icon"][id="id"]'
  end

  it 'render icon with arbitrary attributes' do
    render plain: semantic_icon('add', id: 'id', data: { foo: 'bar' })
    assert_select 'i[class="add icon"][id="id"][data-foo="bar"]'
  end

  it 'render icon with names with string and id' do
    render plain: semantic_icon('add sign', id: 'id')
    assert_select 'i[class="add sign icon"][id="id"]'
  end

  it 'render icon with names with params and id' do
    render plain: semantic_icon('add', 'sign', id: 'id')
    assert_select 'i[class="add sign icon"][id="id"]'
  end

  it 'render icon with names with sym params and id' do
    render plain: semantic_icon(:add, :sign, id: 'id')
    assert_select 'i[class="add sign icon"][id="id"]'
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
fomantic-ui-sass-2.9.3 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.9.2 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.9.1 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.9.0 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.8.1 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.8 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.7.1 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.7 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.6 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.5 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.4 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.3 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.2 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.1.1 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.8.1 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.7.8 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.7.7 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.7.6 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.7.5 spec/helpers/semantic_icon_helper_spec.rb
fomantic-ui-sass-2.7.4 spec/helpers/semantic_icon_helper_spec.rb