summaryrefslogtreecommitdiffstats
path: root/config/environments/test.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-12-17 15:05:47 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-12-17 15:05:47 +0000
commite566e60e51a740387261a06fe800fefece750fb1 (patch)
tree5cd940235f90af265d85573518f25a8beebe1bc2 /config/environments/test.rb
parent4cc0b8d2ca80f4de3a0217184e9ef982f2407c05 (diff)
downloadredmine-e566e60e51a740387261a06fe800fefece750fb1.tar.gz
redmine-e566e60e51a740387261a06fe800fefece750fb1.zip
Adds test for plugin autoload issue (#36320, #39834).
Patch by @tohosaku. git-svn-id: https://svn.redmine.org/redmine/trunk@22522 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/environments/test.rb')
-rw-r--r--config/environments/test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 2e7b23813..ea6080ac7 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -18,6 +18,12 @@ Rails.application.configure do
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
+ # Change default plugins dir if env variable is present
+ # This is used by redmine plugins autoload test.
+ if ENV["REDMINE_PLUGINS_DIRECTORY"].present?
+ config.redmine_plugins_directory = ENV["REDMINE_PLUGINS_DIRECTORY"]
+ end
+
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {