Commit 1cdd261f authored by Romain Courteaud's avatar Romain Courteaud Committed by Gabriel Monnerat

check propagation of acquisitionerror

parent 617e6614
......@@ -110,7 +110,13 @@
.declareAcquiredMethod('plugErrorAcquire',
'acquireMethodRequestedWithAcquisitionError')
.declareMethod('callErrorAcquire', function (param1, param2) {
return this.plugErrorAcquire(param1, param2);
return this.plugErrorAcquire(param1, param2)
.push(undefined, function (error) {
if (error instanceof renderJS.AcquisitionError) {
throw error;
}
throw new Error('Expected AcquisitionError: ' + error);
});
})
.declareMethod('triggerMethodToCancel', function () {
return new RSVP.Promise(function () {
......
......@@ -5840,12 +5840,7 @@
ok(false, result);
})
.push(undefined, function (error) {
equal(
error,
"AcquisitionError: Can not handle " +
"acquireMethodRequestedWithAcquisitionError",
error
);
ok(error instanceof renderJS.AcquisitionError, error);
})
// cancel call is correctly propagated by declareMethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment