diff options
Diffstat (limited to 't/open311')
-rw-r--r-- | t/open311/getservicerequestupdates.t | 14 | ||||
-rw-r--r-- | t/open311/populate-service-list.t | 5 |
2 files changed, 12 insertions, 7 deletions
diff --git a/t/open311/getservicerequestupdates.t b/t/open311/getservicerequestupdates.t index 40868cfdd..da23c944e 100644 --- a/t/open311/getservicerequestupdates.t +++ b/t/open311/getservicerequestupdates.t @@ -204,7 +204,7 @@ for my $test ( $problem->state( $test->{start_state} ); $problem->update; - my $council_details = { areaid => 2482 }; + my $council_details = { areas => { 2482 => 1 } }; my $update = Open311::GetServiceRequestUpdates->new( system_user => $user ); $update->update_comments( $o, $council_details ); @@ -243,7 +243,7 @@ foreach my $test ( $problem->comments->delete; - my $council_details = { areaid => 2482 }; + my $council_details = { areas => { 2482 => 1 } }; my $update = Open311::GetServiceRequestUpdates->new( system_user => $user ); $update->update_comments( $o, $council_details ); @@ -312,7 +312,7 @@ for my $test ( my $o = Open311->new( jurisdiction => 'mysociety', endpoint => 'http://example.com', test_mode => 1, test_get_returns => { 'servicerequestupdates.xml' => $local_requests_xml } ); - my $council_details = { areaid => $test->{area_id} }; + my $council_details = { areas => { $test->{area_id} => 1 } }; my $update = Open311::GetServiceRequestUpdates->new( system_user => $user ); $update->update_comments( $o, $council_details ); @@ -352,7 +352,7 @@ subtest 'using start and end date' => sub { end_date => $end_dt, ); - my $council_details = { areaid => 2482 }; + my $council_details = { areas => { 2482 => 1 } }; $update->update_comments( $o, $council_details ); my $start = $start_dt . ''; @@ -412,7 +412,7 @@ subtest 'check that existing comments are not duplicated' => sub { system_user => $user, ); - my $council_details = { areaid => 2482 }; + my $council_details = { areas => { 2482 => 1 } }; $update->update_comments( $o, $council_details ); $problem->discard_changes; @@ -473,7 +473,7 @@ foreach my $test ( { system_user => $user, ); - my $council_details = { areaid => 2482 }; + my $council_details = { areas => { 2482 => 1 } }; $update->update_comments( $o, $council_details ); $problem->discard_changes; @@ -525,7 +525,7 @@ foreach my $test ( { suppress_alerts => $test->{suppress_alerts}, ); - my $council_details = { areaid => 2482 }; + my $council_details = { areas => { 2482 => 1 } }; $update->update_comments( $o, $council_details ); $problem->discard_changes; diff --git a/t/open311/populate-service-list.t b/t/open311/populate-service-list.t index ae5879896..f33fc97b4 100644 --- a/t/open311/populate-service-list.t +++ b/t/open311/populate-service-list.t @@ -20,11 +20,16 @@ ok $processor, 'created object'; my $body = FixMyStreet::App->model('DB::Body')->find_or_create( { id => 1, name => 'Body Numero Uno', +} ); +$body->body_areas->find_or_create({ area_id => 1 } ); + my $bromley = FixMyStreet::App->model('DB::Body')->find_or_create( { id => 2482, name => 'Bromley Council', +} ); +$bromley->body_areas->find_or_create({ area_id => 2482 } ); |