Sha256: 3adb8742363c304ce7c576ff895adb89be7656249b4298c61f8d26abf80b0711
Contents?: true
Size: 955 Bytes
Versions: 14
Compression:
Stored size: 955 Bytes
Contents
require 'test_helper' class ToolbarTest < ActionView::TestCase include UiBibz::Helpers::Ui::CoreHelper test 'Toolbar' do actual = ui_toolbar do |t| t.button_group do |bg| bg.button 'Home' end end expected = "<div class=\"btn-toolbar\" role=\"toolbar\"><div class=\"btn-group\" role=\"group\"><button class=\"btn\">Home</button></div></div>" assert_equal expected, actual end test 'Toolbar justify' do actual = ui_toolbar justify: true do |t| t.button_group do |bg| bg.button 'Home' end t.spacer 2 t.button_group do |bg| bg.button 'Home 2' end end expected = "<div class=\"btn-toolbar justify-content-between\" role=\"toolbar\"><div class=\"btn-group mr-2\" role=\"group\"><button class=\"btn\">Home</button></div><div class=\"btn-group\" role=\"group\"><button class=\"btn\">Home 2</button></div></div>" assert_equal expected, actual end end
Version data entries
14 entries across 14 versions & 1 rubygems