From 597b18af1cfc76591c3b0207c55726815d6ad438 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 22 Sep 2015 14:07:46 -0700 Subject: [PATCH] [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 --- platform/entanglement/test/services/LinkServiceSpec.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/platform/entanglement/test/services/LinkServiceSpec.js b/platform/entanglement/test/services/LinkServiceSpec.js index 32bb4c0a7a..69c6ebd48c 100644 --- a/platform/entanglement/test/services/LinkServiceSpec.js +++ b/platform/entanglement/test/services/LinkServiceSpec.js @@ -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); });