Sha256: dd2b275e7aa21bb2566de68e5816387acef00ce1739854db54cfa9fc0540ccf7
Contents?: true
Size: 1001 Bytes
Versions: 16
Compression:
Stored size: 1001 Bytes
Contents
# frozen_string_literal: true 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-secondary 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 role="group" class="btn-group mr-2"><button class="btn-secondary btn">Home</button></div><div class="btn-group" role="group"><button class="btn-secondary btn">Home 2</button></div></div>' assert_equal expected, actual end end
Version data entries
16 entries across 16 versions & 1 rubygems