Sha256: bdd982967b50bf879669c80b13ef7756a677d07ace86abb01eed3b29de3db4e1

Contents?: true

Size: 817 Bytes

Versions: 34

Compression:

Stored size: 817 Bytes

Contents

require 'test_helper'
class BadgeTest < ActionView::TestCase
  include UiBibz::Helpers::Ui::CoreHelper

  test 'badge' do
    actual   = ui_badge 'state', status: :success, glyph: 'pencil'
    expected = "<span class=\"badge-success badge\"><i class=\"glyph fas fa-pencil\"></i>  state</span>"

    assert_equal expected, actual
  end

  test 'badge with url' do
    actual   = ui_badge 'state', url: 'http://example.com'
    expected = "<a class=\"badge-default badge\" href=\"http://example.com\">state</a>"

    assert_equal expected, actual
  end

  test 'badge pill' do
    actual   = ui_badge 'state', status: :success, type: :pill, glyph: 'pencil'
    expected = "<span class=\"badge-success badge badge-pill\"><i class=\"glyph fas fa-pencil\"></i>  state</span>"

    assert_equal expected, actual
  end

end

Version data entries

34 entries across 34 versions & 1 rubygems

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