Sha256: 64ab730c478ea320917f8f6216b129f1f3b1c7a0829344ac66a94a723dc98fa3
Contents?: true
Size: 826 Bytes
Versions: 6
Compression:
Stored size: 826 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
6 entries across 6 versions & 1 rubygems