Improve wrapper test for c82574
This test is able to cover changes from c82574.
This commit is contained in:
parent
ac5759cb80
commit
224d5c6eb6
|
@ -60,12 +60,10 @@ class WrapperTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
test 'wrapper does not determine if valid class is needed when it is set to nil' do
|
||||
def @user.name; raise BOOM; end
|
||||
with_form_for @user, :name, as: :file, wrapper: custom_wrapper_with_input_valid_class(valid_class: nil)
|
||||
assert_select 'div'
|
||||
assert_select 'input'
|
||||
assert_no_select 'div.field_with_errors'
|
||||
assert_no_select 'input.is-invalid'
|
||||
@user.instance_eval { undef errors }
|
||||
with_form_for @user, :name, wrapper: custom_wrapper_with_input_valid_class(valid_class: nil)
|
||||
|
||||
assert_no_select 'div.field_without_errors'
|
||||
end
|
||||
|
||||
test 'wrapper adds hint class for attribute with a hint' do
|
||||
|
|
Loading…
Reference in New Issue