1. Unofficial Redmine Clones
  2. Untitled project
  3. redmine-trunk

Commits

jplang  committed 7faa48e

Adds a test for start date < due date validation.

  • Participants
  • Parent commits 8a1f46d
  • Branches default

Comments (0)

Files changed (1)

File test/unit/issue_test.rb

View file
     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')