208 |
208 |
assert one.relations_to.any? { |r| r.issue_from == one_one && r.delay == 2 }
|
209 |
209 |
assert one.relations_to.any? { |r| r.issue_from == one_two && r.delay == 1 }
|
210 |
210 |
|
211 |
|
|
212 |
211 |
assert_equal 1, one_one.relations_from.count
|
213 |
212 |
assert one_one.relations_from.all? { |r| r.relation_type == 'precedes' }
|
214 |
213 |
assert one_one.relations_from.any? { |r| r.issue_to == one && r.delay == 2 }
|
215 |
214 |
|
216 |
|
|
217 |
215 |
assert_equal 1, one_two.relations_to.count
|
218 |
216 |
assert one_two.relations_to.all? { |r| r.relation_type == 'precedes' }
|
219 |
217 |
assert one_two.relations_to.any? { |r| r.issue_from == one_two_one && r.delay == -1 }
|
... | ... | |
222 |
220 |
assert one_two.relations_from.all? { |r| r.relation_type == 'precedes' }
|
223 |
221 |
assert one_two.relations_from.any? { |r| r.issue_to == one && r.delay == 1 }
|
224 |
222 |
|
225 |
|
|
226 |
223 |
assert_equal 1, one_two_one.relations_from.count
|
227 |
224 |
assert one_two_one.relations_from.all? { |r| r.relation_type == 'precedes' }
|
228 |
225 |
assert one_two_one.relations_from.any? { |r| r.issue_to == one_two && r.delay == -1 }
|
... | ... | |
262 |
259 |
:relation_type => 'precedes',
|
263 |
260 |
:delay => 1).present?
|
264 |
261 |
|
265 |
|
|
266 |
262 |
# Checking dates, because they might act weird, when relations are added
|
267 |
|
assert_equal Date.new(2020, 1, 1), parent.start_date
|
268 |
|
assert_equal Date.new(2020, 1, 31), parent.due_date
|
|
263 |
assert_equal Date.new(2020, 1, 1), parent.start_date
|
|
264 |
assert_equal Date.new(2020, 2, 3), parent.due_date
|
269 |
265 |
|
270 |
|
assert_equal Date.new(2020, 1, 1), first.start_date
|
|
266 |
assert_equal Date.new(2020, 1, 1), first.start_date
|
271 |
267 |
assert_equal Date.new(2020, 1, 10), first.due_date
|
272 |
268 |
|
273 |
|
assert_equal Date.new(2020, 1, 12), second.start_date
|
274 |
|
assert_equal Date.new(2020, 1, 20), second.due_date
|
|
269 |
assert_equal Date.new(2020, 1, 14), second.start_date
|
|
270 |
assert_equal Date.new(2020, 1, 21), second.due_date
|
275 |
271 |
|
276 |
|
assert_equal Date.new(2020, 1, 22), third.start_date
|
277 |
|
assert_equal Date.new(2020, 1, 31), third.due_date
|
|
272 |
assert_equal Date.new(2020, 1, 23), third.start_date
|
|
273 |
assert_equal Date.new(2020, 2, 3), third.due_date
|
278 |
274 |
end
|
279 |
275 |
|
280 |
276 |
def test_assignee_should_be_set
|