From 8279acc9a5c9f9d80e9798b0eaba7e396adaa5dc Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 19 May 2016 12:04:08 -0700 Subject: [PATCH] [Persistence] Don't expect persist calls in PropertiesAction spec --- .../edit/test/actions/PropertiesActionSpec.js | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/platform/commonUI/edit/test/actions/PropertiesActionSpec.js b/platform/commonUI/edit/test/actions/PropertiesActionSpec.js index cad091cff5..31036afaac 100644 --- a/platform/commonUI/edit/test/actions/PropertiesActionSpec.js +++ b/platform/commonUI/edit/test/actions/PropertiesActionSpec.js @@ -41,7 +41,6 @@ define( getProperties: function () { return []; }, hasFeature: jasmine.createSpy('hasFeature') }, - persistence: jasmine.createSpyObj("persistence", ["persist"]), mutation: jasmine.createSpy("mutation") }; model = {}; @@ -66,25 +65,18 @@ define( action = new PropertiesAction(dialogService, context); }); - it("persists when an action is performed", function () { - action.perform(); - expect(capabilities.persistence.persist) - .toHaveBeenCalled(); - }); - - it("does not persist any changes upon cancel", function () { - input = undefined; - action.perform(); - expect(capabilities.persistence.persist) - .not.toHaveBeenCalled(); - }); - it("mutates an object when performed", function () { action.perform(); expect(capabilities.mutation).toHaveBeenCalled(); capabilities.mutation.mostRecentCall.args[0]({}); }); + it("does not muate object upon cancel", function () { + input = undefined; + action.perform(); + expect(capabilities.mutation).not.toHaveBeenCalled(); + }); + it("is only applicable when a domain object is in context", function () { expect(PropertiesAction.appliesTo(context)).toBeTruthy(); expect(PropertiesAction.appliesTo({})).toBeFalsy();