diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-07 22:29:50 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-07 22:29:50 +0000 |
commit | fd4a91130465f6b5ae4fc937da13e8674ee4d4de (patch) | |
tree | c26f5cb5677abc3b2cd7c104e56d3b1454736c6c /test/unit/project_copy_test.rb | |
parent | 5d2eea14893b509f0f9044a53270bd84b4e06acb (diff) | |
download | redmine-fd4a91130465f6b5ae4fc937da13e8674ee4d4de.tar.gz redmine-fd4a91130465f6b5ae4fc937da13e8674ee4d4de.zip |
Fixed that project copy triggers a 500 error if project validation fails.
git-svn-id: http://svn.redmine.org/redmine/trunk@13848 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_copy_test.rb')
-rw-r--r-- | test/unit/project_copy_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb index 2f1f6ee59..c10a5de15 100644 --- a/test/unit/project_copy_test.rb +++ b/test/unit/project_copy_test.rb @@ -46,6 +46,11 @@ class ProjectCopyTest < ActiveSupport::TestCase @project.enabled_module_names = @source_project.enabled_modules.collect(&:name) end + def test_copy_should_return_false_if_save_fails + project = Project.new(:name => 'Copy', :identifier => nil) + assert_equal false, project.copy(@source_project) + end + test "#copy should copy issues" do @source_project.issues << Issue.generate!(:status => IssueStatus.find_by_name('Closed'), :subject => "copy issue status", |