Removes unnecessary PUT after DELETE

This commit is contained in:
Ben McMorran
2014-07-09 16:35:13 -04:00
committed by cahrens
parent 572b4fc030
commit f8f0ef1ffa
2 changed files with 2 additions and 8 deletions

View File

@@ -342,16 +342,11 @@ define(["jquery", "underscore", "underscore.string", "js/spec_helpers/create_sin
create_sinon.respondWithJson(requests, {});
// first request contains given component's id (to delete the component)
expect(requests[requests.length - 3].url).toMatch(
expect(requests[requests.length - 2].url).toMatch(
new RegExp("locator-component-" + GROUP_TO_TEST + (componentIndex + 1))
);
// second request contains parent's id (to remove as child)
expect(requests[requests.length - 2].url).toMatch(
new RegExp("locator-group-" + GROUP_TO_TEST)
);
// third request if a fetch of the container.
// second request if a fetch of the container.
expect(lastRequest().url).toMatch(
new RegExp("locator-container")
);

View File

@@ -213,7 +213,6 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/contai
xblock = xblockView.xblock,
parent = this.findXBlockElement(xblockElement.parent());
xblockElement.remove();
xblockView.updateChildren(parent);
xblock.runtime.notify('deleted-child', parent.data('locator'));
// Update publish and last modified information from the server.
this.model.fetch();