Adds a custom validator for dates (#12736).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11124 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-01-05 16:09:15 +00:00
parent 6ed7e091df
commit 3e14c3017c
4 changed files with 16 additions and 16 deletions
+2
View File
@@ -37,6 +37,8 @@ class VersionTest < ActiveSupport::TestCase
assert !v.valid?
v.effective_date = '2012-31-11'
assert !v.valid?
v.effective_date = '-2012-31-11'
assert !v.valid?
v.effective_date = 'ABC'
assert !v.valid?
assert_include I18n.translate('activerecord.errors.messages.not_a_date'),