Browse Source

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
tags/2.2.0
Jean-Philippe Lang 11 years ago
parent
commit
50037b18c4
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      test/unit/issue_test.rb

+ 7
- 0
test/unit/issue_test.rb View File

@@ -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')

Loading…
Cancel
Save