Adds members of subprojects in assignee and author filters (#10126).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8747 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-02-01 20:07:01 +00:00
parent 0154d7477b
commit 2808adf99f
4 changed files with 38 additions and 7 deletions
+5
View File
@@ -27,6 +27,11 @@ class PrincipalTest < ActiveSupport::TestCase
assert_nil result.detect {|p| p.is_a?(AnonymousUser)}
end
def test_member_of_scope_should_return_the_union_of_all_members
projects = Project.find_all_by_id(1, 2)
assert_equal projects.map(&:principals).flatten.sort, Principal.member_of(projects).sort
end
context "#like" do
setup do
Principal.generate!(:login => 'login')