Sha256: c6c55de2eab99c8a3c8b537c26aa41e1adca935d9c56d076db46d766020b6f46
Contents?: true
Size: 825 Bytes
Versions: 20
Compression:
Stored size: 825 Bytes
Contents
require 'test_helper' class ComponentTest < ActionView::TestCase test 'create complex component' do actual = UiBibz::Ui::Core::Component.new('New component', { state: :active, glyph: 'add' }, { class: 'new-class' }).render expected = '<i class="glyph fas fa-add"></i> New component' assert_equal expected, actual end test 'create complex component with block' do actual = UiBibz::Ui::Core::Component.new(state: :active) do "New content" end.render expected = 'New content' assert_equal expected, actual end test 'create component without text and glyph' do actual = UiBibz::Ui::Core::Component.new('My text', { glyph: 'diamond', text: false }).render expected = "<i title=\"My text\" class=\"glyph fas fa-diamond\"></i>" assert_equal expected, actual end end
Version data entries
20 entries across 20 versions & 1 rubygems