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

Add missing test for #17351

This commit is contained in:
Aditya Kapoor 2015-09-01 17:35:50 +05:30
parent 8ce0fdb5c4
commit 69f3f81e6c

View file

@ -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