1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #21447 from aditya-kapoor/add-missing-test-am

Add missing test for #17351
This commit is contained in:
Kasper Timm Hansen 2015-09-01 15:01:09 +02:00
commit 2c271296f5

View file

@ -104,4 +104,18 @@ class ConfirmationValidationTest < ActiveModel::TestCase
assert_equal "expected title", model.title_confirmation, assert_equal "expected title", model.title_confirmation,
"confirmation validation should not override the writer" "confirmation validation should not override the writer"
end 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 end