Feature #28198 » 0002-Fix-failing-test.patch
| test/fixtures/files/import_subtasks_with_relations.csv | ||
|---|---|---|
|
1;bug;2nd Child;2020-01-12;2020-01-20;3;2 1d
|
||
|
2;bug;1st Child;2020-01-01;2020-01-10;3;
|
||
|
3;bug;Parent;2020-01-01;2020-01-31;;
|
||
|
1;bug;3rd Child;2020-01-22;2020-01-31;3;1 1d
|
||
|
4;bug;3rd Child;2020-01-22;2020-01-31;3;1 1d
|
||
| test/unit/issue_import_test.rb | ||
|---|---|---|
|
assert one.relations_to.any? { |r| r.issue_from == one_one && r.delay == 2 }
|
||
|
assert one.relations_to.any? { |r| r.issue_from == one_two && r.delay == 1 }
|
||
|
assert_equal 1, one_one.relations_from.count
|
||
|
assert one_one.relations_from.all? { |r| r.relation_type == 'precedes' }
|
||
|
assert one_one.relations_from.any? { |r| r.issue_to == one && r.delay == 2 }
|
||
|
assert_equal 1, one_two.relations_to.count
|
||
|
assert one_two.relations_to.all? { |r| r.relation_type == 'precedes' }
|
||
|
assert one_two.relations_to.any? { |r| r.issue_from == one_two_one && r.delay == -1 }
|
||
| ... | ... | |
|
assert one_two.relations_from.all? { |r| r.relation_type == 'precedes' }
|
||
|
assert one_two.relations_from.any? { |r| r.issue_to == one && r.delay == 1 }
|
||
|
assert_equal 1, one_two_one.relations_from.count
|
||
|
assert one_two_one.relations_from.all? { |r| r.relation_type == 'precedes' }
|
||
|
assert one_two_one.relations_from.any? { |r| r.issue_to == one_two && r.delay == -1 }
|
||
| ... | ... | |
|
:relation_type => 'precedes',
|
||
|
:delay => 1).present?
|
||
|
# Checking dates, because they might act weird, when relations are added
|
||
|
assert_equal Date.new(2020, 1, 1), parent.start_date
|
||
|
assert_equal Date.new(2020, 1, 31), parent.due_date
|
||
|
assert_equal Date.new(2020, 1, 1), parent.start_date
|
||
|
assert_equal Date.new(2020, 2, 3), parent.due_date
|
||
|
assert_equal Date.new(2020, 1, 1), first.start_date
|
||
|
assert_equal Date.new(2020, 1, 1), first.start_date
|
||
|
assert_equal Date.new(2020, 1, 10), first.due_date
|
||
|
assert_equal Date.new(2020, 1, 12), second.start_date
|
||
|
assert_equal Date.new(2020, 1, 20), second.due_date
|
||
|
assert_equal Date.new(2020, 1, 14), second.start_date
|
||
|
assert_equal Date.new(2020, 1, 21), second.due_date
|
||
|
assert_equal Date.new(2020, 1, 22), third.start_date
|
||
|
assert_equal Date.new(2020, 1, 31), third.due_date
|
||
|
assert_equal Date.new(2020, 1, 23), third.start_date
|
||
|
assert_equal Date.new(2020, 2, 3), third.due_date
|
||
|
end
|
||
|
def test_assignee_should_be_set
|
||