Sha256: d55a98d39997c88f46f0a0defd437eefce2b2c13bbe8327493f724c3b21976e5

Contents?: true

Size: 889 Bytes

Versions: 48

Compression:

Stored size: 889 Bytes

Contents

# frozen_string_literal: true

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

48 entries across 48 versions & 1 rubygems

Version Path
ui_bibz-3.0.0.beta13 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta12 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta11 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta10 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta9 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta8 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta7 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta6 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta5 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta4 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta3 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta2 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta1 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha12 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha11 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha10 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha9 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha8 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha6 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.alpha5 test/ui/core/icons/glyph_test.rb