Skip to content

Commit 0867d7d

Browse files
committed
Add test for additional classes on form_group
1 parent 6e1b63c commit 0867d7d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/bootstrap_form_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,15 @@ def setup
419419
assert_equal expected, output
420420
end
421421

422+
test "form_group accepts class thorugh options hash" do
423+
output = @horizontal_builder.form_group :email, class: "foo" do
424+
%{<p class="form-control-static">Bar</p>}.html_safe
425+
end
426+
427+
expected = %{<div class="form-group foo"><label class="control-label col-sm-2"></label><div class="col-sm-10"><p class="form-control-static">Bar</p></div></div>}
428+
assert_equal expected, output
429+
end
430+
422431
test "static control" do
423432
output = @horizontal_builder.static_control :email
424433

0 commit comments

Comments
 (0)