diff --git a/lib/simple_form/inputs/priority_input.rb b/lib/simple_form/inputs/priority_input.rb index cd45bcda2..397f54b88 100644 --- a/lib/simple_form/inputs/priority_input.rb +++ b/lib/simple_form/inputs/priority_input.rb @@ -15,10 +15,6 @@ def input_priority protected - def has_required? - false - end - def skip_include_blank? super || input_priority.present? end diff --git a/test/inputs/priority_input_test.rb b/test/inputs/priority_input_test.rb index 8eb3b1d0a..a90ca3610 100644 --- a/test/inputs/priority_input_test.rb +++ b/test/inputs/priority_input_test.rb @@ -36,15 +36,15 @@ class PriorityInputTest < ActionView::TestCase assert_no_select 'select option[value=""]', /^$/ end - test 'priority input does not generate invalid required html attribute' do + test 'priority input does generate select element with required html attribute' do with_input_for @user, :country, :country assert_select 'select.required' - assert_no_select 'select[required]' + assert_select 'select[required]' end - test 'priority input does not generate invalid aria-required html attribute' do + test 'priority input does generate select element with aria-required html attribute' do with_input_for @user, :country, :country assert_select 'select.required' - assert_no_select 'select[aria-required]' + assert_select 'select[aria-required]' end end