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:
parent
8ce0fdb5c4
commit
69f3f81e6c
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue