[Persistence] Don't expect persist calls in specs

This commit is contained in:
Victor Woeltjen
2016-05-19 11:50:12 -07:00
parent 3905171457
commit ac3706dfb6
3 changed files with 3 additions and 27 deletions

View File

@@ -27,7 +27,6 @@ define(
describe("A timer's start/restart action", function () {
var mockNow,
mockDomainObject,
mockPersistence,
testModel,
action;
@@ -45,10 +44,6 @@ define(
'domainObject',
[ 'getCapability', 'useCapability' ]
);
mockPersistence = jasmine.createSpyObj(
'persistence',
['persist']
);
mockDomainObject.getCapability.andCallFake(function (c) {
return (c === 'persistence') && mockPersistence;
@@ -67,18 +62,16 @@ define(
});
});
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("does not truncate milliseconds", function () {
mockNow.andReturn(42321);
action.perform();
expect(testModel.timestamp).toEqual(42321);
expect(mockPersistence.persist).toHaveBeenCalled();
});
});
}