From 8244e435bf9d3b26a26acf6c148d94b2497a4477 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 22 Jun 2016 16:13:26 -0700 Subject: [PATCH] [Edit] Update failing spec --- platform/core/test/capabilities/PersistenceCapabilitySpec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/core/test/capabilities/PersistenceCapabilitySpec.js b/platform/core/test/capabilities/PersistenceCapabilitySpec.js index be8c181cbd..2456e0ba19 100644 --- a/platform/core/test/capabilities/PersistenceCapabilitySpec.js +++ b/platform/core/test/capabilities/PersistenceCapabilitySpec.js @@ -74,7 +74,7 @@ define( ); mockQ = jasmine.createSpyObj( "$q", - ["reject"] + ["reject", "when"] ); mockNofificationService = jasmine.createSpyObj( "notificationService", @@ -103,6 +103,7 @@ define( mockIdentifierService.parse.andReturn(mockIdentifier); mockIdentifier.getSpace.andReturn(SPACE); mockIdentifier.getKey.andReturn(key); + mockQ.when.andCallFake(asPromise); persistence = new PersistenceCapability( mockCacheService, mockPersistenceService, @@ -156,6 +157,7 @@ define( }); it("refreshes the domain object model from persistence", function () { var refreshModel = {someOtherKey: "some other value"}; + model.persisted = 1; mockPersistenceService.readObject.andReturn(asPromise(refreshModel)); persistence.refresh(); expect(model).toEqual(refreshModel);