[Persistence] Don't expect persist calls in specs
This commit is contained in:
@@ -46,14 +46,7 @@ define(
|
||||
'domainObject',
|
||||
[ 'getCapability', 'useCapability', 'getModel' ]
|
||||
);
|
||||
mockPersistence = jasmine.createSpyObj(
|
||||
'persistence',
|
||||
['persist']
|
||||
);
|
||||
|
||||
mockDomainObject.getCapability.andCallFake(function (c) {
|
||||
return (c === 'persistence') && mockPersistence;
|
||||
});
|
||||
mockDomainObject.useCapability.andCallFake(function (c, v) {
|
||||
if (c === 'mutation') {
|
||||
testModel = v(testModel) || testModel;
|
||||
@@ -70,11 +63,10 @@ define(
|
||||
action = new StartTimerAction(mockNow, testContext);
|
||||
});
|
||||
|
||||
it("updates the model with a timestamp and persists", function () {
|
||||
it("updates the model with a timestamp", function () {
|
||||
mockNow.andReturn(12000);
|
||||
action.perform();
|
||||
expect(testModel.timestamp).toEqual(12000);
|
||||
expect(mockPersistence.persist).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("applies only to timers without a target time", function () {
|
||||
|
||||
Reference in New Issue
Block a user