summaryrefslogtreecommitdiffstats
path: root/test/exemplars
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-10-19 00:07:37 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-10-19 00:07:37 +0000
commita150689be9281f3a814cd5bdedd42f80f431fe41 (patch)
treedc9f10c027d2f985aa36f47272a6b49ba38bbcd5 /test/exemplars
parent6531c3f88721c083f32c3e313efec6b40708382a (diff)
downloadredmine-a150689be9281f3a814cd5bdedd42f80f431fe41.tar.gz
redmine-a150689be9281f3a814cd5bdedd42f80f431fe41.zip
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
Diffstat (limited to 'test/exemplars')
-rw-r--r--test/exemplars/user_exemplar.rb2
-rw-r--r--test/exemplars/version_exemplar.rb10
2 files changed, 11 insertions, 1 deletions
diff --git a/test/exemplars/user_exemplar.rb b/test/exemplars/user_exemplar.rb
index d88f5fe7d..154b16d8f 100644
--- a/test/exemplars/user_exemplar.rb
+++ b/test/exemplars/user_exemplar.rb
@@ -1,4 +1,4 @@
-class User < ActiveRecord::Base
+class User < Principal
generator_for :login, :method => :next_email
generator_for :mail, :method => :next_email
generator_for :firstname, :method => :next_firstname
diff --git a/test/exemplars/version_exemplar.rb b/test/exemplars/version_exemplar.rb
new file mode 100644
index 000000000..8aef99f4b
--- /dev/null
+++ b/test/exemplars/version_exemplar.rb
@@ -0,0 +1,10 @@
+class Version < ActiveRecord::Base
+ generator_for :name, :method => :next_name
+
+ def self.next_name
+ @last_name ||= 'Version 1.0.0'
+ @last_name.succ!
+ @last_name
+ end
+
+end