From f32e0900dd8c0a97c2b2214c973394e1fda2cb0e Mon Sep 17 00:00:00 2001 From: M Somerville Date: Mon, 5 Oct 2020 16:35:22 +0100 Subject: [Peterborough] Add USRN, nearest address to CSV. --- t/cobrand/peterborough.t | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 't/cobrand') diff --git a/t/cobrand/peterborough.t b/t/cobrand/peterborough.t index 5b461d4f2..f7e45f190 100644 --- a/t/cobrand/peterborough.t +++ b/t/cobrand/peterborough.t @@ -117,13 +117,19 @@ subtest "extra bartec params are sent to open311" => sub { geocode => { resourceSets => [ { resources => [ { + name => '12 A Street, XX1 1SZ', address => { addressLine => '12 A Street', postalCode => 'XX1 1XZ' } } ] } ] - } + }, + extra => { + _fields => [ + { name => 'site_code', value => '12345', }, + ], + }, } ); my $test_data = FixMyStreet::Script::Reports::send(); @@ -139,5 +145,19 @@ subtest "extra bartec params are sent to open311" => sub { }; }; +subtest 'Dashboard CSV extra columns' => sub { + my $staffuser = $mech->create_user_ok('counciluser@example.com', name => 'Council User', + from_body => $peterborough, password => 'password'); + $mech->log_in_ok( $staffuser->email ); + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.uk/', + ALLOWED_COBRANDS => 'peterborough', + }, sub { + $mech->get_ok('/dashboard?export=1'); + }; + $mech->content_contains('"Reported As",USRN,"Nearest address"'); + $mech->content_contains('peterborough,,12345,"12 A Street, XX1 1SZ"'); +}; + done_testing; -- cgit v1.2.3