Adding an extra test for fallback to default label from Rails.
This commit is contained in:
parent
6c28ff5eed
commit
c153f10d0d
|
@ -230,4 +230,12 @@ class FormBuilderTest < ActionView::TestCase
|
||||||
end
|
end
|
||||||
assert_select 'label.string.required#name_label', /My label/
|
assert_select 'label.string.required#name_label', /My label/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test 'builder should fallback to default label when string is given' do
|
||||||
|
simple_form_for @user do |f|
|
||||||
|
concat f.label :name, 'Nome do usuário'
|
||||||
|
end
|
||||||
|
assert_select 'label', 'Nome do usuário'
|
||||||
|
assert_no_select 'label.string'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue