summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-03-24 16:47:54 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-03-24 16:47:54 +0000
commit40ffbff49d82d959927660574c1127e0b982b88e (patch)
treec6bf179bedce9bcc15ff5d2df766e7460c240136 /test/unit/lib
parent750c5e89fb09942ff7fb5f9ab75e695a2f2b8834 (diff)
downloadredmine-40ffbff49d82d959927660574c1127e0b982b88e.tar.gz
redmine-40ffbff49d82d959927660574c1127e0b982b88e.zip
Fix Redmine::Plugin.assets_directory is not working after r21283 (#36835).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21498 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/plugin_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/plugin_test.rb b/test/unit/lib/redmine/plugin_test.rb
index 75c8ece9b..54394ab57 100644
--- a/test/unit/lib/redmine/plugin_test.rb
+++ b/test/unit/lib/redmine/plugin_test.rb
@@ -27,6 +27,10 @@ class Redmine::PluginTest < ActiveSupport::TestCase
@klass.directory = Rails.root.join('test/fixtures/plugins')
# In case some real plugins are installed
@klass.clear
+
+ # Change plugin loader's directory for testing
+ Redmine::PluginLoader.directory = @klass.directory
+ Redmine::PluginLoader.setup
end
def teardown
@@ -55,6 +59,7 @@ class Redmine::PluginTest < ActiveSupport::TestCase
assert_equal 'http://example.net/jsmith', plugin.author_url
assert_equal 'This is a test plugin', plugin.description
assert_equal '0.0.1', plugin.version
+ assert_equal File.join(@klass.directory, 'foo_plugin', 'assets'), plugin.assets_directory
end
def test_register_should_raise_error_if_plugin_directory_does_not_exist