diff options
author | Aditya Kapoor <adityakapoor.mait@gmail.com> | 2015-09-01 17:35:50 +0530 |
---|---|---|
committer | Aditya Kapoor <adityakapoor.mait@gmail.com> | 2015-09-01 17:35:50 +0530 |
commit | 69f3f81e6ca6ee7ce184f6eafaf4b1e1b78564c3 (patch) | |
tree | 39b697d08acf7b32ba1ad1334e8b03fc1352639d /activemodel | |
parent | 8ce0fdb5c412a5083dff3ecb863e86c1853651d7 (diff) | |
download | rails-69f3f81e6ca6ee7ce184f6eafaf4b1e1b78564c3.tar.gz rails-69f3f81e6ca6ee7ce184f6eafaf4b1e1b78564c3.tar.bz2 rails-69f3f81e6ca6ee7ce184f6eafaf4b1e1b78564c3.zip |
Add missing test for #17351
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/validations/confirmation_validation_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations/confirmation_validation_test.rb b/activemodel/test/cases/validations/confirmation_validation_test.rb index c1431548f7..c56bf1c0ad 100644 --- a/activemodel/test/cases/validations/confirmation_validation_test.rb +++ b/activemodel/test/cases/validations/confirmation_validation_test.rb @@ -104,4 +104,18 @@ class ConfirmationValidationTest < ActiveModel::TestCase assert_equal "expected title", model.title_confirmation, "confirmation validation should not override the writer" end + + def test_title_confirmation_with_case_sensitive_option_true + Topic.validates_confirmation_of(:title, case_sensitive: true) + + t = Topic.new(title: "title", title_confirmation: "Title") + assert t.invalid? + end + + def test_title_confirmation_with_case_sensitive_option_false + Topic.validates_confirmation_of(:title, case_sensitive: false) + + t = Topic.new(title: "title", title_confirmation: "Title") + assert t.valid? + end end |