Sha256: eb4a9602dca3e880bc72c6944e3ff7048bdfda99b843a2f1238ac226c748b2b8

Contents?: true

Size: 855 Bytes

Versions: 7

Compression:

Stored size: 855 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 fa 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 fa 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 fa 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 fa fa-add\"></i> Example"
    assert_equal expected, actual
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.beta2.6 test/ui/core/icons/glyph_test.rb
ui_bibz-2.0.0.beta2.5 test/ui/core/glyph_test.rb
ui_bibz-2.0.0.beta2.4 test/ui/core/glyph_test.rb
ui_bibz-2.0.0.beta2.3 test/ui/core/glyph_test.rb
ui_bibz-2.0.0.beta2.2 test/ui/core/glyph_test.rb
ui_bibz-2.0.0.beta2.1 test/ui/core/glyph_test.rb
ui_bibz-2.0.0.beta2 test/ui/core/glyph_test.rb