[Edit] Fix CreateActionSpec

This commit is contained in:
Alex M 2016-09-15 23:18:53 +03:00
parent d3db26499c
commit f03003b366

View File

@ -157,13 +157,13 @@ define(
expect(mockEditAction.perform).toHaveBeenCalled(); expect(mockEditAction.perform).toHaveBeenCalled();
}); });
it("uses the save action if object does not have an edit action" + it("uses the save-as action if object does not have an edit action" +
" available", function () { " available", function () {
capabilities.action.getActions.andReturn([]); capabilities.action.getActions.andReturn([]);
capabilities.action.perform.andReturn(mockPromise(undefined)); capabilities.action.perform.andReturn(mockPromise(undefined));
capabilities.editor.save.andReturn(promise); capabilities.editor.save.andReturn(promise);
action.perform(); action.perform();
expect(capabilities.action.perform).toHaveBeenCalledWith("save"); expect(capabilities.action.perform).toHaveBeenCalledWith("save-as");
}); });
describe("uses to editor capability", function () { describe("uses to editor capability", function () {