diff --git a/platform/features/clock/test/actions/AbstractStartTimerActionSpec.js b/platform/features/clock/test/actions/AbstractStartTimerActionSpec.js index 546c348786..b09f4fba96 100644 --- a/platform/features/clock/test/actions/AbstractStartTimerActionSpec.js +++ b/platform/features/clock/test/actions/AbstractStartTimerActionSpec.js @@ -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(); }); }); } diff --git a/platform/features/clock/test/actions/RestartTimerActionSpec.js b/platform/features/clock/test/actions/RestartTimerActionSpec.js index 72d955b79a..84a4428c17 100644 --- a/platform/features/clock/test/actions/RestartTimerActionSpec.js +++ b/platform/features/clock/test/actions/RestartTimerActionSpec.js @@ -27,7 +27,6 @@ define( describe("A timer's restart action", function () { var mockNow, mockDomainObject, - mockPersistence, testModel, testContext, action; @@ -46,14 +45,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 +62,10 @@ define( action = new RestartTimerAction(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 with a target time", function () { diff --git a/platform/features/clock/test/actions/StartTimerActionSpec.js b/platform/features/clock/test/actions/StartTimerActionSpec.js index 25e0fdfac7..72278a849c 100644 --- a/platform/features/clock/test/actions/StartTimerActionSpec.js +++ b/platform/features/clock/test/actions/StartTimerActionSpec.js @@ -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 () {