# frozen_string_literal: true require 'test_helper' class BoxBoxSwitchFieldTest < ActionView::TestCase # OK test 'box_switch_field size' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', size: :lg).render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field animate' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', animate: false).render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field checked' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', {}, checked: true).render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field state' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', {}, state: 'disabled').render expected = '
' assert_equal expected, actual end # NON FONCTIONNEL test 'box_switch_field readonly' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', {}, readonly: true).render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field left_color' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', left_color: 'success').render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field right_color' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', right_color: 'info').render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field middle_text' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', middle_text: 'testlabeltext').render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field left_text' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', left_text: 'testonlabel').render expected = '
' assert_equal expected, actual end # OK test 'box_switch_field right_text' do actual = UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new('test', right_text: 'testofflabel').render expected = '
' assert_equal expected, actual end end