プロジェクト

全般

プロフィール

Vote #80552

完了

Fix random test failure due to missing call to set_tmp_attachments_directory in WikiControllerTest

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
152
issue_org_id:
32653
author_id:
362529
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

For "WikiControllerTest#test_update_with_deleted_attachment_ids":https://www.redmine.org/projects/redmine/repository/entry/trunk/test/functional/wiki_controller_test.rb#L469 and "WikiControllerTest#test_update_with_deleted_attachment_ids_and_failure_should_preserve_selected_attachments":https://www.redmine.org/projects/redmine/repository/entry/trunk/test/functional/wiki_controller_test.rb#L488 , the files under test/fixtures/files/ may be deleted depending on the test execution order.
Need to call @set_tmp_attachments_directory@ as follows.


diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index e3ac6cb4e..70b892ba5 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -467,6 +467,7 @@ class WikiControllerTest < Redmine::ControllerTest
   end

   def test_update_with_deleted_attachment_ids
+    set_tmp_attachments_directory
     @request.session[:user_id] = 2
     page = WikiPage.find(4)
     attachment = page.attachments.first
@@ -486,6 +487,7 @@ class WikiControllerTest < Redmine::ControllerTest
   end

   def test_update_with_deleted_attachment_ids_and_failure_should_preserve_selected_attachments
+    set_tmp_attachments_directory
     @request.session[:user_id] = 2
     page = WikiPage.find(4)
     attachment = page.attachments.first

journals

--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Committed the patch. Thank you for your contribution.
--------------------------------------------------------------------------------


related_issues

relates,Closed,16410,Bulk delete wiki attachments

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0