summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-18 16:48:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-10-18 16:48:19 +0000
commit50037b18c49267229048c9b8126708a30626bde7 (patch)
treebfafc3ab8c6c0ecb36a3c7364762fb8aa2e47cbf /test
parent1a9d482fc996b542acf4743ac77d834117413a90 (diff)
downloadredmine-50037b18c49267229048c9b8126708a30626bde7.tar.gz
redmine-50037b18c49267229048c9b8126708a30626bde7.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/unit/issue_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index ae6f9ee94..0c3085bb7 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -72,6 +72,13 @@ class IssueTest < ActiveSupport::TestCase
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
set_language_if_valid 'en'
field = IssueCustomField.find_by_name('Database')