From 1c9a9251e59026dae01f257329cb7f335b248b79 Mon Sep 17 00:00:00 2001 From: Cameron Cundiff Date: Sun, 7 Apr 2013 13:52:56 -0400 Subject: [PATCH] Test aria-required on checkbox collection input [#780] --- test/inputs/collection_check_boxes_input_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/inputs/collection_check_boxes_input_test.rb b/test/inputs/collection_check_boxes_input_test.rb index 3fc6a424..ab23bc3c 100644 --- a/test/inputs/collection_check_boxes_input_test.rb +++ b/test/inputs/collection_check_boxes_input_test.rb @@ -23,6 +23,12 @@ class CollectionCheckBoxesInputTest < ActionView::TestCase assert_no_select 'input[required]' end + test 'collection input with check_boxes type should not generate aria-required html attribute' do + with_input_for @user, :name, :check_boxes, collection: ['Jose' , 'Carlos'] + assert_select 'input.required' + assert_no_select 'input[aria-required]' + end + test 'input should do automatic collection translation for check_box types using defaults key' do store_translations(:en, simple_form: { options: { defaults: { gender: { male: 'Male', female: 'Female'}