diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-07-14 16:20:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-07-14 16:20:44 +0000 |
commit | 9f7901e3642bbeb2bf3b5feaefaa10157b111732 (patch) | |
tree | df869bd2eaae5c8055a9fda3095a088c80535a11 /test/unit | |
parent | 58c5c29c1faf12d0f4670966220ef74277d98ecb (diff) | |
download | redmine-9f7901e3642bbeb2bf3b5feaefaa10157b111732.tar.gz redmine-9f7901e3642bbeb2bf3b5feaefaa10157b111732.zip |
Fixed that query roles are not copied when copying a project (#17202).
git-svn-id: http://svn.redmine.org/redmine/trunk@13329 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/project_copy_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb index 238417a2d..2f1f6ee59 100644 --- a/test/unit/project_copy_test.rb +++ b/test/unit/project_copy_test.rb @@ -222,6 +222,17 @@ class ProjectCopyTest < ActiveSupport::TestCase assert_equal @source_project.queries.map(&:user_id).sort, @project.queries.map(&:user_id).sort end + def test_copy_should_copy_queries_roles_visibility + source = Project.generate! + target = Project.new(:name => 'Copy Test', :identifier => 'copy-test') + IssueQuery.generate!(:project => source, :visibility => Query::VISIBILITY_ROLES, :roles => Role.where(:id => [1, 3]).to_a) + + assert target.copy(source) + assert_equal 1, target.queries.size + query = target.queries.first + assert_equal [1, 3], query.role_ids.sort + end + test "#copy should copy versions" do @source_project.versions << Version.generate! @source_project.versions << Version.generate! |