Improved Project#copy to copy more data from the source Project. #3367

* Versions
* Associate the copied issues with the new versions
* Wiki
* WikiPages
* WikiContents
* IssueCategories

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2934 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-10-19 00:07:37 +00:00
parent 6531c3f887
commit a150689be9
5 changed files with 139 additions and 2 deletions
+13
View File
@@ -21,6 +21,19 @@ require 'test_help'
require File.expand_path(File.dirname(__FILE__) + '/helper_testcase')
require File.join(RAILS_ROOT,'test', 'mocks', 'open_id_authentication_mock.rb')
# TODO: The gem or official version of ObjectDaddy doesn't set
# protected attributes so they need to be wrapped.
def User.generate_with_protected!(attributes={})
user = User.spawn(attributes) do |user|
user.login = User.next_login
attributes.each do |attr,v|
user.send("#{attr}=", v)
end
end
user.save!
user
end
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the