# frozen_string_literal: true require 'test_helper' class ChoiceGroupTest < ActionView::TestCase include UiBibz::Helpers::Ui::CoreHelper test 'Choice group checkbox' do actual = UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new.tap do |bc| bc.choice 'Checkbox 1' bc.choice 'Checkbox 2', state: :active end expected = "
" assert_equal expected, actual.render end test 'Choice group radio' do actual = UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(type: :radio).tap do |bc| bc.choice 'Radio 1' bc.choice 'Radio 2', state: :active end expected = "
" assert_equal expected, actual.render end test 'Choice group options' do actual = UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(size: :lg, outline: true, type: :radio).tap do |bc| bc.choice 'Radio 1', glyph: 'diamond', status: :primary bc.choice 'Radio 2', state: :active end expected = "
" assert_equal expected, actual.render end end