diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-17 17:59:35 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-06-04 14:09:32 +0100 |
commit | 4fd8fce72cf9adae08e1827fda984049a10580a5 (patch) | |
tree | 240bf392aee601b925f5980413d44bcff88745dd /t/cobrand/bromley.t | |
parent | 360539076792ddaea6cb1ffb5cd48d694fc75be6 (diff) |
[Bromley] Include asset ID in title if given.
Diffstat (limited to 't/cobrand/bromley.t')
-rw-r--r-- | t/cobrand/bromley.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/cobrand/bromley.t b/t/cobrand/bromley.t index e42ab5be2..b3fb3564b 100644 --- a/t/cobrand/bromley.t +++ b/t/cobrand/bromley.t @@ -54,6 +54,7 @@ for my $test ( 'attribute[easting]' => 529025, 'attribute[northing]' => 179716, 'attribute[service_request_id_ext]' => $report->id, + 'attribute[report_title]' => 'Test Test 1 for ' . $body->id, 'jurisdiction_id' => 'FMS', address_id => undef, }, @@ -72,11 +73,20 @@ for my $test ( 'address_id' => '#NOTPINPOINTED#', }, }, + { + desc => 'asset ID', + feature_id => '1234', + expected => { + 'attribute[service_request_id_ext]' => $report->id, + 'attribute[report_title]' => 'Test Test 1 for ' . $body->id . ' | ID: 1234', + }, + }, ) { subtest $test->{desc}, sub { - $report->set_extra_fields(); $report->$_($test->{updates}->{$_}) for keys %{$test->{updates}}; $report->$_(undef) for qw/ whensent send_method_used external_id /; + $report->set_extra_fields({ name => 'feature_id', value => $test->{feature_id} }) + if $test->{feature_id}; $report->update; $body->update( { send_method => 'Open311', endpoint => 'http://bromley.endpoint.example.com', jurisdiction => 'FMS', api_key => 'test', send_comments => 1 } ); my $test_data; |