diff options
author | Go MAEDA <maeda@farend.jp> | 2021-07-06 06:01:50 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-07-06 06:01:50 +0000 |
commit | 7f965286ed6b1d7e906e8662daba0d49b1cf7666 (patch) | |
tree | aea4a14340b1e4ec29743bddf2cdef5f9b643206 /test/unit/project_copy_test.rb | |
parent | 1b0bf2880374307e9669cfd4ed32cfe6677a3503 (diff) | |
download | redmine-7f965286ed6b1d7e906e8662daba0d49b1cf7666.tar.gz redmine-7f965286ed6b1d7e906e8662daba0d49b1cf7666.zip |
Default issue query (#7360).
Patch by Katsuya HIDAKA (the author of https://github.com/hidakatsuya/redmine_default_custom_query), Takenori TAKAKI, Olivier Chabert, and Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@21061 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_copy_test.rb')
-rw-r--r-- | test/unit/project_copy_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb index aca9cbf3f..50cc1c9c9 100644 --- a/test/unit/project_copy_test.rb +++ b/test/unit/project_copy_test.rb @@ -283,6 +283,19 @@ class ProjectCopyTest < ActiveSupport::TestCase assert_equal [1, 3], query.role_ids.sort end + test "#copy should copy default issue query assignment" do + source = Project.generate! + query = IssueQuery.generate!(:project => source, :user => User.find(2)) + source.update_column :default_issue_query_id, query.id + + target = Project.new(:name => 'Copy Test', :identifier => 'copy-test') + assert target.copy(source) + + assert target.default_issue_query.present? + assert_equal 1, target.queries.size + assert_equal query.name, target.default_issue_query.name + end + test "#copy should copy versions" do @source_project.versions << Version.generate! @source_project.versions << Version.generate! |