Github user kxepal commented on a diff in the pull request: https://github.com/apache/couchdb-fauxton/pull/324#discussion_r26830331 --- Diff: app/addons/documents/tests/resourcesSpec.js --- @@ -233,28 +238,61 @@ define([ collection.handleResponse([ {"ok":true,"id":"Deferred","rev":"10-72cd2edbcc0d197ce96188a229a7af01"}, {"ok":true,"id":"DeskSet","rev":"6-da537822b9672a4b2f42adb1be04a5b1"} - ]); + ], promise); }); it("triggers a error event with all errored ids", function () { + var promise = FauxtonAPI.Deferred(); + collection.listenToOnce(collection, 'error', function (ids) { assert.deepEqual(ids, ['Deferred']); }); collection.handleResponse([ - {"error":"confclict","id":"Deferred","rev":"10-72cd2edbcc0d197ce96188a229a7af01"}, + {"error":"conflict","id":"Deferred","rev":"10-72cd2edbcc0d197ce96188a229a7af01"}, {"ok":true,"id":"DeskSet","rev":"6-da537822b9672a4b2f42adb1be04a5b1"} - ]); + ], promise); }); it("removes successfull deleted from the collection but keeps one with errors", function () { + var promise = FauxtonAPI.Deferred(); collection.handleResponse([ {"error":"confclict","id":"1","rev":"10-72cd2edbcc0d197ce96188a229a7af01"}, --- End diff -- You'd fixed that typo above, but not here.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---