diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-06-23 16:30:29 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-06-23 18:18:26 +0100 |
commit | 4b780de3e34128a4581dbc4daead30be00ceadb4 (patch) | |
tree | 3e52feb4e64c9752d5d73098bd74986846850333 /t/open311/post-service-request-updates.t | |
parent | 58a7df7603b657e8b56bae9b46a0451b4534e9ad (diff) |
[Open311] Use devolved data on update sending.
Diffstat (limited to 't/open311/post-service-request-updates.t')
-rw-r--r-- | t/open311/post-service-request-updates.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/open311/post-service-request-updates.t b/t/open311/post-service-request-updates.t index 71bba4af7..75711bd2d 100644 --- a/t/open311/post-service-request-updates.t +++ b/t/open311/post-service-request-updates.t @@ -16,7 +16,7 @@ my $params = { endpoint => 'endpoint', jurisdiction => 'home', }; -my $bromley = $mech->create_body_ok(2482, 'Bromley', { %$params, send_extended_statuses => 1 }); +my $bromley = $mech->create_body_ok(2482, 'Bromley', { %$params, send_extended_statuses => 1, can_be_devolved => 1 }); my $oxon = $mech->create_body_ok(2237, 'Oxfordshire', { %$params, id => "5" . $bromley->id }); my $bucks = $mech->create_body_ok(2217, 'Buckinghamshire', $params); my $lewisham = $mech->create_body_ok(2492, 'Lewisham', $params); @@ -135,5 +135,12 @@ subtest 'Oxfordshire gets an ID' => sub { }; }; +subtest 'Devolved contact' => sub { + $mech->create_contact_ok(body_id => $bromley->id, category => 'Other', email => "OTHER", send_method => 'Open311', endpoint => '/devolved-endpoint/'); + $c1->update({ send_fail_count => 0 }); + $o->send; + $c1->discard_changes; + like $c1->send_fail_reason, qr/devolved-endpoint/, 'Failure message contains correct endpoint'; +}; done_testing(); |