Defect #31053 ยป fix-fixtures.patch
test/fixtures/projects_trackers.yml | ||
---|---|---|
44 | 44 |
projects_trackers_015: |
45 | 45 |
project_id: 6 |
46 | 46 |
tracker_id: 1 |
47 |
projects_trackers_016: |
|
48 |
project_id: 3 |
|
49 |
tracker_id: 1 |
test/unit/project_test.rb | ||
---|---|---|
465 | 465 | |
466 | 466 |
def test_rolled_up_trackers |
467 | 467 |
parent = Project.find(1) |
468 |
parent.trackers = Tracker.find([1,2]) |
|
469 | 468 |
child = parent.children.find(3) |
469 |
parent.trackers = Tracker.find([1,2]) |
|
470 |
child.trackers = Tracker.find([2,3]) |
|
470 | 471 | |
471 | 472 |
assert_equal [1, 2], parent.tracker_ids |
472 | 473 |
assert_equal [2, 3], child.trackers.collect(&:id) |