[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
This commit is contained in:
Pete Richards 2016-06-15 10:31:25 -07:00
parent 2d5824c4ab
commit c00b053aa7

View File

@ -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
);
});