@@ -31,8 +31,10 class PrincipalTest < ActiveSupport::TestCase | |||
|
31 | 31 | end |
|
32 | 32 | |
|
33 | 33 | def test_member_of_scope_should_return_the_union_of_all_members |
|
34 |
projects = Project.find |
|
|
35 |
assert_equal |
|
|
34 | projects = Project.find([1]) | |
|
35 | assert_equal [3, 2], Principal.member_of(projects).sort.map(&:id) | |
|
36 | projects = Project.find([1, 2]) | |
|
37 | assert_equal [3, 2, 8, 11], Principal.member_of(projects).sort.map(&:id) | |
|
36 | 38 | end |
|
37 | 39 | |
|
38 | 40 | def test_member_of_scope_should_be_empty_for_no_projects |
General Comments 0
You need to be logged in to leave comments.
Login now