mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 15:10:50 +00:00
[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:
parent
b4a2bfd727
commit
597b18af1c
@ -88,19 +88,15 @@ define(
|
|||||||
expect(validate()).toBe(false);
|
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 () {
|
it("does not allow parents without composition", function () {
|
||||||
parentCandidate = domainObjectFactory({
|
parentCandidate = domainObjectFactory({
|
||||||
name: 'parentCandidate'
|
name: 'parentCandidate'
|
||||||
});
|
});
|
||||||
object.id = 'abc';
|
object.id = 'abc';
|
||||||
parentCandidate.id = 'xyz';
|
parentCandidate.id = 'xyz';
|
||||||
|
parentCandidate.hasCapability.andCallFake(function (c) {
|
||||||
|
return c !== 'composition';
|
||||||
|
});
|
||||||
parentCandidate.model.composition = undefined;
|
parentCandidate.model.composition = undefined;
|
||||||
expect(validate()).toBe(false);
|
expect(validate()).toBe(false);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user