Mercurial > hg > soundsoftware-site
comparison test/unit/issue_relation_test.rb @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 513646585e45 |
children | 07fa8a8b56a8 |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program; if not, write to the Free Software | 15 # along with this program; if not, write to the Free Software |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | 17 |
18 require File.dirname(__FILE__) + '/../test_helper' | 18 require File.expand_path('../../test_helper', __FILE__) |
19 | 19 |
20 class IssueRelationTest < ActiveSupport::TestCase | 20 class IssueRelationTest < ActiveSupport::TestCase |
21 fixtures :issue_relations, :issues | 21 fixtures :issue_relations, :issues |
22 | 22 |
23 def test_create | 23 def test_create |
61 | 61 |
62 relation = IssueRelation.new :issue_from => from, :issue_to => to, :relation_type => IssueRelation::TYPE_PRECEDES | 62 relation = IssueRelation.new :issue_from => from, :issue_to => to, :relation_type => IssueRelation::TYPE_PRECEDES |
63 assert_equal IssueRelation::TYPE_PRECEDES, relation.relation_type_for(from) | 63 assert_equal IssueRelation::TYPE_PRECEDES, relation.relation_type_for(from) |
64 assert_equal IssueRelation::TYPE_FOLLOWS, relation.relation_type_for(to) | 64 assert_equal IssueRelation::TYPE_FOLLOWS, relation.relation_type_for(to) |
65 end | 65 end |
66 | |
67 def test_set_issue_to_dates_without_issue_to | |
68 r = IssueRelation.new(:issue_from => Issue.new(:start_date => Date.today), :relation_type => IssueRelation::TYPE_PRECEDES, :delay => 1) | |
69 assert_nil r.set_issue_to_dates | |
70 end | |
71 | |
72 def test_set_issue_to_dates_without_issues | |
73 r = IssueRelation.new(:relation_type => IssueRelation::TYPE_PRECEDES, :delay => 1) | |
74 assert_nil r.set_issue_to_dates | |
75 end | |
66 end | 76 end |