Adding tests for default label class
This commit is contained in:
parent
da0463b9d6
commit
8dfa0d885f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue