Pretender intercepted GET ... but no handler was defined for this type of request for an external request

1.5k views Asked by At

I use Stripe in an Ember app. Stripe makes request to this address : https://checkout.stripe.com/api/outer/manhattan?key=... In my acceptance test, I have this message : Pretender intercepted GET https://checkout.stripe.com/api/outer/manhattan?key=... but no handler was defined for this type of request.

I tried to stub this request like this :

var server = new Pretender(function() {
  this.get("/api/outer/manhattan", function() {
    return [200, {}, this.passthrough];
  });
});

But it does not work. I also tried with the full url or with a wildcard without success.

Is there a solution ?

0

There are 0 answers