aboutsummaryrefslogtreecommitdiffstats
path: root/t/Mock
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-09-21 23:00:53 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-09-30 21:13:33 +0100
commit4e6d1c359c94b0aa864bc48f28a8962113a47629 (patch)
tree67ba615aac2413cc06cde4738455461c21ff1b0d /t/Mock
parent57f52190fc1edb515563d524b179906a3006ba78 (diff)
Add ability to confirm reports/updates via text.
Diffstat (limited to 't/Mock')
-rw-r--r--t/Mock/Twilio.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/Mock/Twilio.pm b/t/Mock/Twilio.pm
index b35166704..eaad30b76 100644
--- a/t/Mock/Twilio.pm
+++ b/t/Mock/Twilio.pm
@@ -7,6 +7,14 @@ has texts => (
default => sub { [] },
);
+sub get_text_code {
+ my $self = shift;
+ my $text = shift @{$self->texts};
+ return unless $text;
+ my ($code) = $text->{Body} =~ /(\d+)/;
+ return $code;
+}
+
sub dispatch_request {
my $self = shift;