From 6d258b5fa03861d74d156893dcd85bcf404223ea Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Mon, 10 Jul 2017 21:43:56 -0700 Subject: [PATCH 1/2] schema change. --- test/dummy/db/schema.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index a072ddbdb..3d4fd4ba0 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -18,8 +18,8 @@ t.string "city" t.string "state" t.string "zip_code" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "users", force: :cascade do |t| @@ -28,8 +28,8 @@ t.text "comments" t.string "status" t.string "misc" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "preferences" t.boolean "terms", default: false t.string "type" From d72302c2dcbfdff25b21c501dd66aa42afc850c5 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Fri, 1 Sep 2017 09:07:04 -0700 Subject: [PATCH 2/2] Test cases for #342. --- test/bootstrap_checkbox_test.rb | 5 +++++ test/bootstrap_radio_button_test.rb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/bootstrap_checkbox_test.rb b/test/bootstrap_checkbox_test.rb index 0d2832690..51d58ba1f 100644 --- a/test/bootstrap_checkbox_test.rb +++ b/test/bootstrap_checkbox_test.rb @@ -12,6 +12,11 @@ def setup assert_equivalent_xml expected, @builder.check_box(:terms, label: 'I agree to the terms') end + test "check_box is wrapped correctly with custom id" do + expected = %{
} + assert_equivalent_xml expected, @builder.check_box(:terms, label: 'I agree to the terms', id: :custom_id) + end + test "disabled check_box has proper wrapper classes" do expected = %{
} assert_equivalent_xml expected, @builder.check_box(:terms, label: 'I agree to the terms', disabled: true) diff --git a/test/bootstrap_radio_button_test.rb b/test/bootstrap_radio_button_test.rb index b420c1e01..51ef5ab84 100644 --- a/test/bootstrap_radio_button_test.rb +++ b/test/bootstrap_radio_button_test.rb @@ -12,6 +12,11 @@ def setup assert_equivalent_xml expected, @builder.radio_button(:misc, '1', label: 'This is a radio button') end + test "radio_button is wrapped correctly with custom id" do + expected = %{
} + assert_equivalent_xml expected, @builder.radio_button(:misc, '1', label: 'This is a radio button', id: "custom_id") + end + test "radio_button disabled label is set correctly" do expected = %{
} assert_equivalent_xml expected, @builder.radio_button(:misc, '1', label: 'This is a radio button', disabled: true)