Adds a test for start date < due date validation.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10672 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-10-18 16:48:19 +00:00
parent 1a9d482fc9
commit 50037b18c4
1 changed files with 7 additions and 0 deletions

View File

@ -72,6 +72,13 @@ class IssueTest < ActiveSupport::TestCase
end end
end end
def test_due_date_lesser_than_start_date_should_not_validate
set_language_if_valid 'en'
issue = Issue.new(:start_date => '2012-10-06', :due_date => '2012-10-02')
assert !issue.valid?
assert_include 'Due date must be greater than start date', issue.errors.full_messages
end
def test_create_with_required_custom_field def test_create_with_required_custom_field
set_language_if_valid 'en' set_language_if_valid 'en'
field = IssueCustomField.find_by_name('Database') field = IssueCustomField.find_by_name('Database')