##// END OF EJS Templates
Don't clear plugins in tests (#16258)....
Jean-Philippe Lang -
r12713:abf24a7d9239
parent child
Show More
@@ -113,6 +113,12 module Redmine #:nodoc:
113 @registered_plugins = {}
113 @registered_plugins = {}
114 end
114 end
115
115
116 # Removes a plugin from the registered plugins
117 # It doesn't unload the plugin
118 def self.unregister(id)
119 @registered_plugins.delete(id)
120 end
121
116 # Checks if a plugin is installed
122 # Checks if a plugin is installed
117 #
123 #
118 # @param [String] id name of the plugin
124 # @param [String] id name of the plugin
@@ -148,7 +148,8 class SettingsControllerTest < ActionController::TestCase
148 assert_tag 'form', :attributes => {:action => '/settings/plugin/foo'},
148 assert_tag 'form', :attributes => {:action => '/settings/plugin/foo'},
149 :descendant => {:tag => 'input', :attributes => {:name => 'settings[sample_setting]', :value => 'Plugin setting value'}}
149 :descendant => {:tag => 'input', :attributes => {:name => 'settings[sample_setting]', :value => 'Plugin setting value'}}
150
150
151 Redmine::Plugin.clear
151 ensure
152 Redmine::Plugin.unregister(:foo)
152 end
153 end
153
154
154 def test_get_invalid_plugin_settings
155 def test_get_invalid_plugin_settings
@@ -162,7 +163,8 class SettingsControllerTest < ActionController::TestCase
162 get :plugin, :id => 'foo'
163 get :plugin, :id => 'foo'
163 assert_response 404
164 assert_response 404
164
165
165 Redmine::Plugin.clear
166 ensure
167 Redmine::Plugin.unregister(:foo)
166 end
168 end
167
169
168 def test_post_plugin_settings
170 def test_post_plugin_settings
@@ -181,6 +183,7 class SettingsControllerTest < ActionController::TestCase
181 post :plugin, :id => 'foo', :settings => {'sample_setting' => 'Value'}
183 post :plugin, :id => 'foo', :settings => {'sample_setting' => 'Value'}
182 assert_response 404
184 assert_response 404
183
185
184 Redmine::Plugin.clear
186 ensure
187 Redmine::Plugin.unregister(:foo)
185 end
188 end
186 end
189 end
General Comments 0
You need to be logged in to leave comments. Login now