mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 06:03:08 +00:00
ac5ac8d34e
No longer necessary after JSHint configuration.
25 lines
783 B
JavaScript
25 lines
783 B
JavaScript
|
|
define(
|
|
["../src/CompositionModelPolicy"],
|
|
function (CompositionModelPolicy) {
|
|
|
|
describe("The composition model policy", function () {
|
|
var mockType,
|
|
policy;
|
|
|
|
beforeEach(function () {
|
|
mockType = jasmine.createSpyObj('type', ['getInitialModel']);
|
|
policy = new CompositionModelPolicy();
|
|
});
|
|
|
|
it("only allows composition for types which will have a composition property", function () {
|
|
mockType.getInitialModel.andReturn({});
|
|
expect(policy.allow(mockType)).toBeFalsy();
|
|
mockType.getInitialModel.andReturn({ composition: [] });
|
|
expect(policy.allow(mockType)).toBeTruthy();
|
|
});
|
|
});
|
|
|
|
}
|
|
);
|