[Persistence] Don't expect persist calls in EditRepresenter spec

This commit is contained in:
Victor Woeltjen 2016-05-19 11:52:58 -07:00
parent 0aba9122a1
commit 9b273bc148

View File

@ -30,7 +30,6 @@ define(
mockScope, mockScope,
testRepresentation, testRepresentation,
mockDomainObject, mockDomainObject,
mockPersistence,
mockStatusCapability, mockStatusCapability,
mockEditorCapability, mockEditorCapability,
mockCapabilities, mockCapabilities,
@ -56,15 +55,12 @@ define(
"useCapability", "useCapability",
"hasCapability" "hasCapability"
]); ]);
mockPersistence =
jasmine.createSpyObj("persistence", ["persist"]);
mockStatusCapability = mockStatusCapability =
jasmine.createSpyObj("statusCapability", ["listen"]); jasmine.createSpyObj("statusCapability", ["listen"]);
mockEditorCapability = mockEditorCapability =
jasmine.createSpyObj("editorCapability", ["isEditContextRoot"]); jasmine.createSpyObj("editorCapability", ["isEditContextRoot"]);
mockCapabilities = { mockCapabilities = {
'persistence': mockPersistence,
'status': mockStatusCapability, 'status': mockStatusCapability,
'editor': mockEditorCapability 'editor': mockEditorCapability
}; };
@ -96,7 +92,7 @@ define(
expect(representer.listenHandle).toHaveBeenCalled(); expect(representer.listenHandle).toHaveBeenCalled();
}); });
it("mutates and persists upon observed changes", function () { it("mutates upon observed changes", function () {
mockScope.model = { someKey: "some value" }; mockScope.model = { someKey: "some value" };
mockScope.configuration = { someConfiguration: "something" }; mockScope.configuration = { someConfiguration: "something" };
@ -108,9 +104,6 @@ define(
jasmine.any(Function) jasmine.any(Function)
); );
// ... and should have persisted the mutation
expect(mockPersistence.persist).toHaveBeenCalled();
// Finally, check that the provided mutation function // Finally, check that the provided mutation function
// includes both model and configuratioon // includes both model and configuratioon
expect( expect(