From c00b053aa76508d9c6aa408cdc33b3b47c03c1b5 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Wed, 15 Jun 2016 10:31:25 -0700 Subject: [PATCH] [Tests] verify that identifier service provides key Verify that the results of the identifier service are used for persistence calls instead of the domain object id. https://github.com/nasa/openmct/issues/1013 --- .../core/test/capabilities/PersistenceCapabilitySpec.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/core/test/capabilities/PersistenceCapabilitySpec.js b/platform/core/test/capabilities/PersistenceCapabilitySpec.js index 5c826dc602..be8c181cbd 100644 --- a/platform/core/test/capabilities/PersistenceCapabilitySpec.js +++ b/platform/core/test/capabilities/PersistenceCapabilitySpec.js @@ -35,7 +35,8 @@ define( mockNofificationService, mockCacheService, mockQ, - id = "object id", + key = "persistence key", + id = "object identifier", model, SPACE = "some space", persistence, @@ -101,7 +102,7 @@ define( }); mockIdentifierService.parse.andReturn(mockIdentifier); mockIdentifier.getSpace.andReturn(SPACE); - mockIdentifier.getKey.andReturn(id); + mockIdentifier.getKey.andReturn(key); persistence = new PersistenceCapability( mockCacheService, mockPersistenceService, @@ -125,7 +126,7 @@ define( expect(mockPersistenceService.createObject).toHaveBeenCalledWith( SPACE, - id, + key, model ); }); @@ -139,7 +140,7 @@ define( expect(mockPersistenceService.updateObject).toHaveBeenCalledWith( SPACE, - id, + key, model ); });