diff test/unit/.svn/text-base/issue_relation_test.rb.svn-base @ 117:af80e5618e9b redmine-1.1

* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author Chris Cannam
date Thu, 13 Jan 2011 12:53:21 +0000
parents 513646585e45
children 07fa8a8b56a8
line wrap: on
line diff
--- a/test/unit/.svn/text-base/issue_relation_test.rb.svn-base	Fri Nov 19 14:05:24 2010 +0000
+++ b/test/unit/.svn/text-base/issue_relation_test.rb.svn-base	Thu Jan 13 12:53:21 2011 +0000
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-require File.dirname(__FILE__) + '/../test_helper'
+require File.expand_path('../../test_helper', __FILE__)
 
 class IssueRelationTest < ActiveSupport::TestCase
   fixtures :issue_relations, :issues
@@ -63,4 +63,14 @@
     assert_equal IssueRelation::TYPE_PRECEDES, relation.relation_type_for(from)
     assert_equal IssueRelation::TYPE_FOLLOWS, relation.relation_type_for(to)
   end
+  
+  def test_set_issue_to_dates_without_issue_to
+    r = IssueRelation.new(:issue_from => Issue.new(:start_date => Date.today), :relation_type => IssueRelation::TYPE_PRECEDES, :delay => 1)
+    assert_nil r.set_issue_to_dates
+  end
+  
+  def test_set_issue_to_dates_without_issues
+    r = IssueRelation.new(:relation_type => IssueRelation::TYPE_PRECEDES, :delay => 1)
+    assert_nil r.set_issue_to_dates
+  end
 end