@@ -113,6 +113,12 module Redmine #:nodoc: | |||
|
113 | 113 | @registered_plugins = {} |
|
114 | 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 | 122 | # Checks if a plugin is installed |
|
117 | 123 | # |
|
118 | 124 | # @param [String] id name of the plugin |
@@ -148,7 +148,8 class SettingsControllerTest < ActionController::TestCase | |||
|
148 | 148 | assert_tag 'form', :attributes => {:action => '/settings/plugin/foo'}, |
|
149 | 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 | 153 | end |
|
153 | 154 | |
|
154 | 155 | def test_get_invalid_plugin_settings |
@@ -162,7 +163,8 class SettingsControllerTest < ActionController::TestCase | |||
|
162 | 163 | get :plugin, :id => 'foo' |
|
163 | 164 | assert_response 404 |
|
164 | 165 | |
|
165 | Redmine::Plugin.clear | |
|
166 | ensure | |
|
167 | Redmine::Plugin.unregister(:foo) | |
|
166 | 168 | end |
|
167 | 169 | |
|
168 | 170 | def test_post_plugin_settings |
@@ -181,6 +183,7 class SettingsControllerTest < ActionController::TestCase | |||
|
181 | 183 | post :plugin, :id => 'foo', :settings => {'sample_setting' => 'Value'} |
|
182 | 184 | assert_response 404 |
|
183 | 185 | |
|
184 | Redmine::Plugin.clear | |
|
186 | ensure | |
|
187 | Redmine::Plugin.unregister(:foo) | |
|
185 | 188 | end |
|
186 | 189 | end |
General Comments 0
You need to be logged in to leave comments.
Login now