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