Adding tests for default label class

This commit is contained in:
Rodrigo Navarro 2011-02-08 09:12:28 +08:00 committed by Carlos Antonio da Silva
parent da0463b9d6
commit 8dfa0d885f
1 changed files with 7 additions and 0 deletions

View File

@ -205,4 +205,11 @@ class LabelTest < ActionView::TestCase
with_label_for :project, :description, :string, :required => false
assert_no_select 'label.required[for=project_description]'
end
test 'label should add chosen label class' do
swap SimpleForm, :label_class => :my_custom_class do
with_label_for @user, :name, :string
assert_select 'label.my_custom_class'
end
end
end