mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 16:56:00 +01:00
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:
3
test/fixtures/plugins/foo_plugin/app/models/foo.rb
vendored
Normal file
3
test/fixtures/plugins/foo_plugin/app/models/foo.rb
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
class Foo < ActiveRecord::Base
|
||||||
|
end
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user