Sha256: 0cf5587a3408d73852e0b31c3997aea603225ee1dde682f8baffc986c65a9c9e

Contents?: true

Size: 861 Bytes

Versions: 37

Compression:

Stored size: 861 Bytes

Contents

require 'test_helper'


class GlyphTest < ActionView::TestCase
  include UiBibz::Helpers::Ui::CoreHelper

  test 'create glyph with a name' do
    actual   = ui_glyph('add')
    expected = '<i class="glyph fas fa-add"></i>'
    assert_equal expected, actual
  end

  test 'create glyph with hash' do
    actual   = ui_glyph({ name: 'add', size: 3, type: 'li'})
    expected = '<i class="glyph fas fa-add fa-3x fa-li"></i>'
    assert_equal expected, actual
  end

  test 'create glyph with name and hash' do
    actual   = ui_glyph('add', { size: 3, type: 'li' })
    expected = '<i class="glyph fas fa-add fa-3x fa-li"></i>'
    assert_equal expected, actual
  end

  test 'create glyph with label' do
    actual   = ui_glyph('add', { label: 'Example' })
    expected = "<i class=\"glyph fas fa-add\"></i> Example"
    assert_equal expected, actual
  end

end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
ui_bibz-2.4.0 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.15 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.14 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.13 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.12 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.11 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.10 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.9 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.8 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.7 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.6 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.5 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.4 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.3 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.2 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.1 test/ui/core/icons/glyph_test.rb
ui_bibz-2.3.0 test/ui/core/icons/glyph_test.rb
ui_bibz-2.2.2 test/ui/core/icons/glyph_test.rb
ui_bibz-2.2.1 test/ui/core/icons/glyph_test.rb
ui_bibz-2.2.0 test/ui/core/icons/glyph_test.rb