Adding an extra test for fallback to default label from Rails.

This commit is contained in:
Carlos Antonio da Silva 2009-12-10 13:56:19 -02:00
parent 6c28ff5eed
commit c153f10d0d
1 changed files with 8 additions and 0 deletions

View File

@ -230,4 +230,12 @@ class FormBuilderTest < ActionView::TestCase
end
assert_select 'label.string.required#name_label', /My label/
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