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

check propagation of acquisitionerror

parent 617e6614
...@@ -110,7 +110,13 @@ ...@@ -110,7 +110,13 @@
.declareAcquiredMethod('plugErrorAcquire', .declareAcquiredMethod('plugErrorAcquire',
'acquireMethodRequestedWithAcquisitionError') 'acquireMethodRequestedWithAcquisitionError')
.declareMethod('callErrorAcquire', function (param1, param2) { .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 () { .declareMethod('triggerMethodToCancel', function () {
return new RSVP.Promise(function () { return new RSVP.Promise(function () {
......
...@@ -5840,12 +5840,7 @@ ...@@ -5840,12 +5840,7 @@
ok(false, result); ok(false, result);
}) })
.push(undefined, function (error) { .push(undefined, function (error) {
equal( ok(error instanceof renderJS.AcquisitionError, error);
error,
"AcquisitionError: Can not handle " +
"acquireMethodRequestedWithAcquisitionError",
error
);
}) })
// cancel call is correctly propagated by declareMethod // 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