summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-07-21 01:41:14 +0000
committerGo MAEDA <maeda@farend.jp>2022-07-21 01:41:14 +0000
commit5740256ed928d81741510067e2594fd061dbb8e5 (patch)
tree4760281400a2b898635567dca95edf865a52514c /test
parentc68090dae7760171da143eba59630cdc676e3f8a (diff)
downloadredmine-5740256ed928d81741510067e2594fd061dbb8e5.tar.gz
redmine-5740256ed928d81741510067e2594fd061dbb8e5.zip
Merged r21725 from trunk to 5.0-stable (#37450, #37476).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21729 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/plugin_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/plugin_test.rb b/test/unit/lib/redmine/plugin_test.rb
index 54394ab57..a5a1b2aa3 100644
--- a/test/unit/lib/redmine/plugin_test.rb
+++ b/test/unit/lib/redmine/plugin_test.rb
@@ -196,6 +196,13 @@ class Redmine::PluginTest < ActiveSupport::TestCase
end
end
+ def test_default_settings
+ @klass.register(:foo_plugin) {settings :default => {'key1' => 'abc', :key2 => 123}}
+ h = Setting.plugin_foo_plugin
+ assert_equal 'abc', h['key1']
+ assert_equal 123, h[:key2]
+ end
+
def test_settings_warns_about_possible_partial_collision
@klass.register(:foo_plugin) {settings :partial => 'foo/settings'}
Rails.logger.expects(:warn)