summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-02-27 07:23:06 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-02-27 07:23:06 +0000
commitd60c0654e0ed2d45b8d3af0209278ec490f6c6e8 (patch)
tree63a143fb66c304335720688847459b3dae786a46 /test
parent5a847b7e1490577cd46ca77b1ab2861bff8001a8 (diff)
downloadredmine-d60c0654e0ed2d45b8d3af0209278ec490f6c6e8.tar.gz
redmine-d60c0654e0ed2d45b8d3af0209278ec490f6c6e8.zip
Merged r22747 from trunk to 5.0-stable (#39948).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22751 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/plugin_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/plugin_test.rb b/test/unit/lib/redmine/plugin_test.rb
index 26d8ec85f..56c04de71 100644
--- a/test/unit/lib/redmine/plugin_test.rb
+++ b/test/unit/lib/redmine/plugin_test.rb
@@ -62,6 +62,14 @@ class Redmine::PluginTest < ActiveSupport::TestCase
assert_equal File.join(@klass.directory, 'foo_plugin', 'assets'), plugin.assets_directory
end
+ ::FooModel = Class.new(ActiveRecord::Base)
+ def test_register_attachment_object_type
+ Redmine::Acts::Attachable::ObjectTypeConstraint.expects(:register_object_type).with("foo_models")
+ @klass.register :foo_plugin do
+ attachment_object_type FooModel
+ end
+ end
+
def test_register_should_raise_error_if_plugin_directory_does_not_exist
e = assert_raises Redmine::PluginNotFound do
@klass.register(:bar_plugin) {}