Sha256: 3a4919ee16cb9b3ef06ec6eff145891dfdfe15ef3d03f8c1cfb33ca5109d1c3b
Contents?: true
Size: 835 Bytes
Versions: 6
Compression:
Stored size: 835 Bytes
Contents
# frozen_string_literal: true 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
6 entries across 6 versions & 1 rubygems