Adds test for plugin autoloading plugins issue (#36320).

Patch by @tohosaku.

git-svn-id: https://svn.redmine.org/redmine/trunk@22508 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2023-12-10 03:41:09 +00:00
parent e6f2e33856
commit a255430b68
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# frozen_string_literal: true
class Foo < ActiveRecord::Base
end

View File

@@ -56,6 +56,10 @@ class Redmine::PluginLoaderTest < ActiveSupport::TestCase
assert File.exist?("#{@klass.public_directory}/foo_plugin/stylesheets/foo.css") assert File.exist?("#{@klass.public_directory}/foo_plugin/stylesheets/foo.css")
end end
def test_autoload
assert_equal true, Object.const_defined?(:Foo)
end
def clear_public def clear_public
FileUtils.rm_rf 'tmp/public' FileUtils.rm_rf 'tmp/public'
end end