diff options
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r-- | test/unit/project_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index ffb514aa3..b6b578a9e 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -991,4 +991,13 @@ class ProjectTest < ActiveSupport::TestCase p.status = Project::STATUS_CLOSED assert_include 'closed', p.css_classes.split end + + def test_combination_of_visible_and_uniq_scopes_in_case_anonymous_group_has_memberships_should_not_error + project = Project.find(1) + member = Member.create!(:project => project, :principal => Group.anonymous, :roles => [Role.generate!]) + project.members << member + assert_nothing_raised do + Project.uniq.visible.to_a + end + end end |