Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Aug 16, 2023
2 parents 438be9d + dc0ab1c commit 7392508
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/centralbedfordshire/jadu/init_update_gathering_files
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use Open311::Endpoint::Integration::UK::CentralBedfordshire::Jadu;

my $lookback_days;
GetOptions("lookback-days=i" => \$lookback_days);
if (!$lookback_days) {
if (!defined($lookback_days)) {
print "Please specify a number of days to look back for updates via --lookback-days";
exit 1;
}
Expand Down
3 changes: 3 additions & 0 deletions perllib/Open311/Endpoint/Integration/UK/Brent/Echo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ around process_service_request_args => sub {
} elsif ($service_id == 317) {
$args->{attributes}{"Garden_BIN"} = 1;
$args->{attributes}{"Garden_BAG"} = 1;
} elsif ($service_id == 274) {
$args->{attributes}{"Clinical_BIN"} = 1;
$args->{attributes}{"Clinical_BOX"} = 1;
}
} elsif ($request->{event_type} == 1159) {
if ($args->{attributes}{Paid_Collection_Container_Type} == 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ sub get_service_request_updates {
my $start_time = $w3c->parse_datetime($args->{start_date})->epoch;
my $end_time = $w3c->parse_datetime($args->{end_date})->epoch;

return unless $self->update_storage_file;

my $update_storage_raw = path($self->update_storage_file)->slurp_raw;
my $updates = decode_json($update_storage_raw);
my @updates_to_send;
Expand Down
1 change: 1 addition & 0 deletions perllib/Open311/Endpoint/Integration/UK/Kingston.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ around check_for_data_value => sub {

my $method = $args->{attributes}{LastPayMethod} || '';
return 2 if $name eq 'Payment Type' && $method eq 3; # DD
return 3 if $name eq 'Payment Type' && $method eq 4; # 'cheque' (or phone)

return $class->$orig($name, $args, $request, $parent_name);
};
Expand Down
1 change: 1 addition & 0 deletions perllib/Open311/Endpoint/Integration/UK/Sutton.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ around check_for_data_value => sub {

my $method = $args->{attributes}{LastPayMethod} || '';
return 2 if $name eq 'Payment Type' && $method eq 3; # DD
return 3 if $name eq 'Payment Type' && $method eq 4; # 'cheque' (or phone)

return $class->$orig($name, $args, $request, $parent_name);
};
Expand Down
2 changes: 1 addition & 1 deletion t/geocode/singlepoint.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ subtest "get_nearest_addresses" => sub {
$resp->content(path(__FILE__)->sibling("files/singlepoint/spatial_radial_search_by_easting_and_northing_response.xml")->slurp);
return $resp;
});
my $singlepoint = Geocode::SinglePoint->new();
my $singlepoint = Geocode::SinglePoint->new( base_url => '', api_key => '' );
# Call with arbitrary easting, northing and radius.
my $addresses = $singlepoint->get_nearest_addresses(0, 0, 0, ["STREET", "USRN", "TOWN"]);

Expand Down
8 changes: 8 additions & 0 deletions t/open311/endpoint/sutton.t
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ $soap_lite->mock(call => sub {
my @type = ${$data[1]->value}->value;
is $type[0]->value, 1009;
is $type[1]->value, 1;
} elsif ($client_ref eq 'LBS-2000123') {
is $event_type, EVENT_TYPE_SUBSCRIBE;
is $service_id, 409;
my @data = ${$params[0]->value}->value->value;
my @paper = ${$data[0]->value}->value;
is $paper[0]->value, 1009;
is $paper[1]->value, 3;
}
return SOAP::Result->new(result => {
EventGuid => '1234',
Expand Down Expand Up @@ -116,6 +123,7 @@ subtest "POST subscription request OK" => sub {
'attribute[Subscription_Details_Containers]' => 26, # Garden Bin
'attribute[Subscription_Details_Quantity]' => 1,
'attribute[Request_Type]' => 1,
'attribute[LastPayMethod]' => 4,
);
ok $res->is_success, 'valid request'
or diag $res->content;
Expand Down

0 comments on commit 7392508

Please sign in to comment.