]> source.dussan.org Git - redmine.git/commitdiff
Backport fix of random failing integration test for plugin routes to 5.1-stable branc...
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 17 Dec 2023 03:13:02 +0000 (03:13 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 17 Dec 2023 03:13:02 +0000 (03:13 +0000)
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22521 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing/plugins_test.rb

index 155dd7af4ae94b8114676d5e0b0b249e32d8296d..b6397de9936abab81837a6b6b69f9cdee481fd40 100644 (file)
@@ -21,6 +21,7 @@ require File.expand_path('../../test_helper', __dir__)
 
 class RoutingPluginsTest < Redmine::RoutingTest
   setup do
+    @original_plugin_dir = Redmine::PluginLoader.directory
     @tmp_plugins_path = Rails.root.join('tmp/test/plugins')
 
     @setup_plugin_paths = []
@@ -61,6 +62,9 @@ class RoutingPluginsTest < Redmine::RoutingTest
 
   teardown do
     FileUtils.rm_rf @tmp_plugins_path
+
+    Redmine::Plugin.clear
+    Redmine::PluginLoader.directory = @original_plugin_dir
     Redmine::PluginLoader.load
     RedmineApp::Application.instance.routes_reloader.reload!
   end