Don't show url parsing errors when checking for preloaded plugins
Bug: Issue 9486 Change-Id: I24a99801fc291e96cee9b2bafffa98e8a045caba
This commit is contained in:
@@ -412,6 +412,14 @@ limitations under the License.
|
||||
element.EventType.ADMIN_MENU_LINKS);
|
||||
});
|
||||
|
||||
test('Gerrit._isPluginPreloaded', () => {
|
||||
Gerrit._preloadedPlugins = {baz: ()=>{}};
|
||||
assert.isFalse(Gerrit._isPluginPreloaded('plugins/foo/bar'));
|
||||
assert.isFalse(Gerrit._isPluginPreloaded('http://a.com/42'));
|
||||
assert.isTrue(Gerrit._isPluginPreloaded('preloaded:baz'));
|
||||
Gerrit._preloadedPlugins = null;
|
||||
});
|
||||
|
||||
test('preloaded plugins are installed', () => {
|
||||
const installStub = sandbox.stub();
|
||||
Gerrit._preloadedPlugins = {foo: installStub};
|
||||
|
||||
Reference in New Issue
Block a user