diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-10-09 18:37:48 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-10-12 12:49:50 +0100 |
commit | b97d677e3e7438dfa4ecfd66911d4796ecacc5d2 (patch) | |
tree | 81c84cf635b45650c76183d30cc1bf3616f46e61 /t/Mock/Twilio.pm | |
parent | f26bfdae09608927c8110dca352f0631e420b44e (diff) |
Spot errors coming back when sending text.
Diffstat (limited to 't/Mock/Twilio.pm')
-rw-r--r-- | t/Mock/Twilio.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/Mock/Twilio.pm b/t/Mock/Twilio.pm index eaad30b76..125daa55f 100644 --- a/t/Mock/Twilio.pm +++ b/t/Mock/Twilio.pm @@ -20,6 +20,10 @@ sub dispatch_request { sub (POST + /2010-04-01/Accounts/*/Messages.json + %*) { my ($self, $sid, $data) = @_; + if ($data->{To} eq '+18165550101') { + return [ 400, [ 'Content-Type' => 'application/json' ], + [ '{"code":"21408", "message": "Unable to send"}' ] ]; + } push @{$self->texts}, $data; return [ 200, [ 'Content-Type' => 'application/json' ], [ '{}' ] ]; }, |