Sha256: 98f59e4f0139f996ab342fa75a5d2254a6ac89ca0cee531a02fc5b2b32c3d7f6
Contents?: true
Size: 807 Bytes
Versions: 5
Compression:
Stored size: 807 Bytes
Contents
require 'test_helper' include UiBibz::Helpers class ButtonChoiceTest < ActionView::TestCase test 'checkbox button checked' do actual = UiBibz::Ui::Core::Forms::Buttons::ButtonChoice.new('state', { state: :active }).render expected = "<label class=\"active btn-primary btn\"><input type=\"checkbox\" autocomplete=\"off\" checked=\"checked\" />state</label>" assert_equal expected, actual end test 'checkbox button non checked' do actual = UiBibz::Ui::Core::Forms::Buttons::ButtonChoice.new('state', { name: 'state', id: 'state', input_html_options: { class: 'state'}}).render expected = "<label class=\"btn-primary btn\"><input type=\"checkbox\" autocomplete=\"off\" name=\"state\" id=\"state\" class=\"state\" />state</label>" assert_equal expected, actual end end
Version data entries
5 entries across 5 versions & 1 rubygems