From 084459818a11b1ffe29158381d30040841aff429 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Thu, 1 Oct 2026 01:40:48 +0000 Subject: [PATCH] Tests to prove it works --- test/bootstrap_form_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/bootstrap_form_test.rb b/test/bootstrap_form_test.rb index 423a490b..33d04f23 100644 --- a/test/bootstrap_form_test.rb +++ b/test/bootstrap_form_test.rb @@ -1061,6 +1061,22 @@ def warn(message, ...) assert_equivalent_html expected, namespaced_form_for.errors_on(:email) assert_equivalent_html expected, namespaced_form_with.errors_on(:email) end + + test "bootstrap_form_with uses class: argument not in html arguments" do + expected = <<~HTML +
+
+ HTML + assert_equivalent_html expected, bootstrap_form_with(model: @user, class: "custom-class") { |_f| nil } + end + + test "bootstrap_form_with uses id: argument not in html arguments" do + expected = <<~HTML +
+
+ HTML + assert_equivalent_html expected, bootstrap_form_with(scope: :user, url: "/users", id: "custom-id") { |_f| nil } + end end class LegacyBootstrapFormTest < ActionView::TestCase