Merged r7782 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@7999 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-11-29 21:14:24 +00:00
parent ff75a959e0
commit 63e2e52dd3
2 changed files with 2 additions and 0 deletions

View File

@ -809,6 +809,7 @@ class Project < ActiveRecord::Base
new_query.attributes = query.attributes.dup.except("id", "project_id", "sort_criteria")
new_query.sort_criteria = query.sort_criteria if query.sort_criteria
new_query.project = self
new_query.user_id = query.user_id
self.queries << new_query
end
end

View File

@ -888,6 +888,7 @@ class ProjectTest < ActiveSupport::TestCase
assert query
assert_equal @project, query.project
end
assert_equal @source_project.queries.map(&:user_id).sort, @project.queries.map(&:user_id).sort
end
should "copy versions" do