Merged r10810 from trunk (#12359).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10821 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,7 +32,13 @@ class VersionTest < ActiveSupport::TestCase
|
||||
|
||||
def test_invalid_effective_date_validation
|
||||
v = Version.new(:project => Project.find(1), :name => '1.1', :effective_date => '99999-01-01')
|
||||
assert !v.save
|
||||
assert !v.valid?
|
||||
v.effective_date = '2012-11-33'
|
||||
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'),
|
||||
v.errors[:effective_date]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user