mirror of
https://github.com/nasa/openmct.git
synced 2025-04-15 23:16:46 +00:00
[Edit] Test return type
...from the edit-mode-wrapped persistence capability.
This commit is contained in:
parent
03edd26e17
commit
d5f054e328
@ -31,6 +31,7 @@ define(
|
||||
mockEditableObject,
|
||||
mockDomainObject,
|
||||
mockCache,
|
||||
mockPromise,
|
||||
capability;
|
||||
|
||||
beforeEach(function () {
|
||||
@ -50,7 +51,9 @@ define(
|
||||
"cache",
|
||||
[ "markDirty" ]
|
||||
);
|
||||
mockPromise = jasmine.createSpyObj("promise", ["then"]);
|
||||
|
||||
mockCache.markDirty.andReturn(mockPromise);
|
||||
mockDomainObject.getCapability.andReturn(mockPersistence);
|
||||
|
||||
capability = new EditablePersistenceCapability(
|
||||
@ -84,6 +87,10 @@ define(
|
||||
expect(mockPersistence.refresh).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns a promise from persist", function () {
|
||||
expect(capability.persist().then).toEqual(jasmine.any(Function));
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user