diff options
author | M Somerville <matthew-github@dracos.co.uk> | 2020-09-11 18:11:03 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-09-25 16:20:40 +0100 |
commit | 2abe443efb8bbbd7cf3048eec271fd28a777932f (patch) | |
tree | ed7c25c63e9774e851152224078621b2016229be /t/app/controller/report_new_text.t | |
parent | 82a3e9bfcf094538db75755f63984a428670dedd (diff) |
Show error if text confirmation code sending fails
Diffstat (limited to 't/app/controller/report_new_text.t')
-rw-r--r-- | t/app/controller/report_new_text.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/app/controller/report_new_text.t b/t/app/controller/report_new_text.t index 8753e7e20..fa012c6ae 100644 --- a/t/app/controller/report_new_text.t +++ b/t/app/controller/report_new_text.t @@ -72,6 +72,19 @@ foreach my $test ( }, errors => [ 'Please enter a mobile number', ], }, + { + msg => 'number that fails', + pc => 'EH1 1BB', + fields => { + update_method => 'phone', phone => '+18165550101', email => '', + %defaults, + }, + changes => { + username => '', + phone => '+1 816-555-0101', + }, + errors => [ 'Sending a confirmation text failed: "Unable to send (21408)"' ], + }, ) { subtest "check form errors where $test->{msg}" => sub { @@ -82,6 +95,7 @@ foreach my $test ( MAPIT_URL => 'http://mapit.uk/', SMS_AUTHENTICATION => 1, PHONE_COUNTRY => 'GB', + TWILIO_ACCOUNT_SID => 'AC123', }, sub { $mech->submit_form_ok( { with_fields => { pc => $test->{pc} } }, "submit location" ); |