[Testing] Test plugin installation

This commit is contained in:
Victor Woeltjen 2017-04-04 11:19:45 -07:00
parent 5f968b50f8
commit 6870055033

View File

@ -26,13 +26,32 @@ define([
], function (MCT, plugins) {
describe("MCT", function () {
var openmct;
var mockPlugin;
var mockPlugin2;
beforeEach(function () {
mockPlugin = jasmine.createSpy('plugin');
mockPlugin2 = jasmine.createSpy('plugin');
openmct = new MCT();
openmct.install(mockPlugin);
openmct.install(mockPlugin2);
});
it("exposes plugins", function () {
expect(openmct.plugins).toEqual(plugins);
});
describe("when started", function () {
beforeEach(function () {
openmct.start();
});
it("calls plugins for configuration", function () {
expect(mockPlugin).toHaveBeenCalledWith(openmct);
expect(mockPlugin2).toHaveBeenCalledWith(openmct);
});
});
});
});