summaryrefslogtreecommitdiffstats
path: root/test/unit/project_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-16 20:06:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-16 20:06:37 +0000
commit3fc655904f90e407d95201d0b76114dce2e992d9 (patch)
tree56a12828af64b69c5c8b5921c52175da2595c83b /test/unit/project_test.rb
parente24358bc4374f68ad3000e88ae4c3f686b1f4b2b (diff)
downloadredmine-3fc655904f90e407d95201d0b76114dce2e992d9.tar.gz
redmine-3fc655904f90e407d95201d0b76114dce2e992d9.zip
Copy issue status on project copy (#3877).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3075 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r--test/unit/project_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index b4bb4cc11..93e4bbf22 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -406,6 +406,11 @@ class ProjectTest < ActiveSupport::TestCase
end
should "copy issues" do
+ @source_project.issues << Issue.generate!(:status_id => 5,
+ :subject => "copy issue status",
+ :tracker_id => 1,
+ :assigned_to_id => 2,
+ :project_id => @source_project.id)
assert @project.valid?
assert @project.issues.empty?
assert @project.copy(@source_project)
@@ -416,6 +421,11 @@ class ProjectTest < ActiveSupport::TestCase
assert ! issue.assigned_to.blank?
assert_equal @project, issue.project
end
+
+ copied_issue = @project.issues.first(:conditions => {:subject => "copy issue status"})
+ assert copied_issue
+ assert copied_issue.status
+ assert_equal "Closed", copied_issue.status.name
end
should "change the new issues to use the copied version" do