diff options
author | Go MAEDA <maeda@farend.jp> | 2018-04-28 04:44:32 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-04-28 04:44:32 +0000 |
commit | 07f0c2791edcbb73f5a5ef01410ee5666a79c6d1 (patch) | |
tree | 212c853d0498684642dd944088c0a5c448090e74 /test | |
parent | ea562ffa435301a73e0838f2563a6c868799c2a0 (diff) | |
download | redmine-07f0c2791edcbb73f5a5ef01410ee5666a79c6d1.tar.gz redmine-07f0c2791edcbb73f5a5ef01410ee5666a79c6d1.zip |
Copy wiki attachments on project copy (#10282).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17315 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/project_copy_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb index a1292204b..56f485c76 100644 --- a/test/unit/project_copy_test.rb +++ b/test/unit/project_copy_test.rb @@ -303,7 +303,8 @@ class ProjectCopyTest < ActiveSupport::TestCase assert project.wiki end - test "#copy should copy wiki pages and content with hierarchy" do + test "#copy should copy wiki pages, attachment and content with hierarchy" do + @source_project.wiki.pages.first.attachments << Attachment.first.copy assert_difference 'WikiPage.count', @source_project.wiki.pages.size do assert @project.copy(@source_project) end @@ -311,6 +312,8 @@ class ProjectCopyTest < ActiveSupport::TestCase assert @project.wiki assert_equal @source_project.wiki.pages.size, @project.wiki.pages.size + assert_equal @source_project.wiki.pages.first.attachments.first.filename, @project.wiki.pages.first.attachments.first.filename + @project.wiki.pages.each do |wiki_page| assert wiki_page.content assert !@source_project.wiki.pages.include?(wiki_page) |