summaryrefslogtreecommitdiffstats
path: root/test/functional/settings_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-04-19 15:23:54 +0000
committerGo MAEDA <maeda@farend.jp>2019-04-19 15:23:54 +0000
commit18a4f64547488db9973551ce54329699299b2d8a (patch)
tree1976f65497c196835ced991968eb0d0dd094e46f /test/functional/settings_controller_test.rb
parent42532605db5abd5608ce6cff6cc4da91f49a8e64 (diff)
downloadredmine-18a4f64547488db9973551ce54329699299b2d8a.tar.gz
redmine-18a4f64547488db9973551ce54329699299b2d8a.zip
Fix plugins test to use correct plugin name and directory (#31110).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@18063 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/settings_controller_test.rb')
-rw-r--r--test/functional/settings_controller_test.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/functional/settings_controller_test.rb b/test/functional/settings_controller_test.rb
index 3b9a47f6c..fd24fbc48 100644
--- a/test/functional/settings_controller_test.rb
+++ b/test/functional/settings_controller_test.rb
@@ -201,6 +201,7 @@ class SettingsControllerTest < Redmine::ControllerTest
ActionController::Base.append_view_path(File.join(Rails.root, "test/fixtures/plugins"))
Redmine::Plugin.register :foo do
settings :partial => "foo_plugin/foo_plugin_settings"
+ directory 'test/fixtures/plugins/foo_plugin'
end
Setting.plugin_foo = {'sample_setting' => 'Plugin setting value'}
@@ -220,7 +221,9 @@ class SettingsControllerTest < Redmine::ControllerTest
end
def test_get_non_configurable_plugin_settings
- Redmine::Plugin.register(:foo) {}
+ Redmine::Plugin.register(:foo) do
+ directory 'test/fixtures/plugins/foo_plugin'
+ end
get :plugin, :params => {:id => 'foo'}
assert_response 404
@@ -233,6 +236,7 @@ class SettingsControllerTest < Redmine::ControllerTest
Redmine::Plugin.register(:foo) do
settings :partial => 'not blank', # so that configurable? is true
:default => {'sample_setting' => 'Plugin setting value'}
+ directory 'test/fixtures/plugins/foo_plugin'
end
post :plugin, :params => {
@@ -248,6 +252,7 @@ class SettingsControllerTest < Redmine::ControllerTest
Redmine::Plugin.register(:foo) do
settings :partial => 'not blank', # so that configurable? is true
:default => {'sample_setting' => 'Plugin setting value'}
+ directory 'test/fixtures/plugins/foo_plugin'
end
post :plugin, :params => {
@@ -259,7 +264,9 @@ class SettingsControllerTest < Redmine::ControllerTest
end
def test_post_non_configurable_plugin_settings
- Redmine::Plugin.register(:foo) {}
+ Redmine::Plugin.register(:foo) do
+ directory 'test/fixtures/plugins/foo_plugin'
+ end
post :plugin, :params => {
:id => 'foo',