Sha256: 2736f5a031770dcafa733d89d1370af2d6784436dafce28dd50e8189a77dc8c5

Contents?: true

Size: 1.41 KB

Versions: 17

Compression:

Stored size: 1.41 KB

Contents

require 'spec_helper'

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

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

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

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

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

  it "render icon with arbitrary attributes" do
    render text: 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 text: 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 text: 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 text: semantic_icon(:add, :sign, id: 'id')
    assert_select 'i[class="add sign icon"][id="id"]'
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
semantic-ui-sass-2.2.10.1 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.10.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.9.3 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.9.2 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.9.1 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.9.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.7.1 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.7.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.6.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.4.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.3.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.2.2 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.2.1 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.2.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.1.1 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.1.0 spec/helpers/semantic_icon_helper_spec.rb
semantic-ui-sass-2.2.0.0 spec/helpers/semantic_icon_helper_spec.rb