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.13 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.12 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.11 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.10 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.9 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.8 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.7 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.6 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.5 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.4 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.3 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.2 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.1 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta19 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta18 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta17 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta16 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta15 test/ui/core/icons/glyph_test.rb
ui_bibz-3.0.0.beta14 test/ui/core/icons/glyph_test.rb