提交 082a5158 编写于 作者: Y Yves Senn

Merge pull request #25243 from sukesan1984/add_i18n_validation_test

Add i18n_validation_test
...@@ -41,10 +41,8 @@ def replied_topic ...@@ -41,10 +41,8 @@ def replied_topic
[ "given custom message", {:message => "custom"}, {:message => "custom"}], [ "given custom message", {:message => "custom"}, {:message => "custom"}],
[ "given if condition", {:if => lambda { true }}, {}], [ "given if condition", {:if => lambda { true }}, {}],
[ "given unless condition", {:unless => lambda { false }}, {}], [ "given unless condition", {:unless => lambda { false }}, {}],
[ "given option that is not reserved", {:format => "jpg"}, {:format => "jpg" }] [ "given option that is not reserved", {:format => "jpg"}, {:format => "jpg" }],
# TODO Add :on case, but below doesn't work, because then the validation isn't run for some reason [ "given on condition", {on: [:create, :update] }, {}]
# even when using .save instead .valid?
# [ "given on condition", {on: :save}, {}]
] ]
COMMON_CASES.each do |name, validation_options, generate_message_options| COMMON_CASES.each do |name, validation_options, generate_message_options|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册