Sha256: 537e7728617d055cf1f5815a6b130dd588ec7903d50d9b96f4a12304b976ec02

Contents?: true

Size: 726 Bytes

Versions: 40

Compression:

Stored size: 726 Bytes

Contents

require 'test_helper'

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

  test 'create glyph with a name' do
    actual   = UiBibz::Ui::Core::Glyph.new('add').render
    expected = '<i class="glyph fa fa-add"></i>'
    assert_equal expected, actual
  end

  test 'create glyph with hash' do
    actual   = UiBibz::Ui::Core::Glyph.new({ name: 'add', size: 3, type: 'li'}).render
    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   = UiBibz::Ui::Core::Glyph.new('add', { size: 3, type: 'li' }).render
    expected = '<i class="glyph fa fa-add fa-3x fa-li"></i>'
    assert_equal expected, actual
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.alpha24 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha23 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha22 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha21 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha20 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha19 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha18 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha16 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha15 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha14 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha13 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha12 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha11 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha10 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha9 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha8 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha7 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha6 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha5 test/ui/glyph_test.rb
ui_bibz-2.0.0.alpha4 test/ui/glyph_test.rb