[LinkService] Amend test cases

Remove redundant test case; modify composition-checking
test case to expose correct capability information.
In response to feedback from nasa/openmctweb#98
This commit is contained in:
Victor Woeltjen 2015-09-22 14:07:46 -07:00
parent b4a2bfd727
commit 597b18af1c

View File

@ -88,19 +88,15 @@ define(
expect(validate()).toBe(false);
});
it("does not allow parents that contains object", function () {
object.id = 'abc';
parentCandidate.id = 'xyz';
parentCandidate.model.composition = ['abc'];
expect(validate()).toBe(false);
});
it("does not allow parents without composition", function () {
parentCandidate = domainObjectFactory({
name: 'parentCandidate'
});
object.id = 'abc';
parentCandidate.id = 'xyz';
parentCandidate.hasCapability.andCallFake(function (c) {
return c !== 'composition';
});
parentCandidate.model.composition = undefined;
expect(validate()).toBe(false);
});