@@ -31,8 +31,10 class PrincipalTest < ActiveSupport::TestCase | |||||
31 | end |
|
31 | end | |
32 |
|
32 | |||
33 | def test_member_of_scope_should_return_the_union_of_all_members |
|
33 | def test_member_of_scope_should_return_the_union_of_all_members | |
34 |
projects = Project.find |
|
34 | projects = Project.find([1]) | |
35 |
assert_equal |
|
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 | end |
|
38 | end | |
37 |
|
39 | |||
38 | def test_member_of_scope_should_be_empty_for_no_projects |
|
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