Skip to content

Commit

Permalink
fixup! [Bexley][WW] Cancel GGW subscription
Browse files Browse the repository at this point in the history
Send tomorrow’s date when cancelling
  • Loading branch information
davea committed Feb 18, 2025
1 parent be31544 commit dc67712
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion perllib/FixMyStreet/Cobrand/Bexley/Garden.pm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ sub waste_garden_sub_params {
my $srv = $self->garden_current_subscription;

my $parser = DateTime::Format::Strptime->new( pattern => '%d/%m/%Y' );
my $due_date_str = $parser->format_datetime( $srv->{end_date} );
my $due_date_str = $parser->format_datetime( DateTime->now->add(days => 1) );

my $reason = $data->{reason};
$reason .= ': ' . $data->{reason_further_details}
Expand Down
5 changes: 3 additions & 2 deletions t/app/controller/waste_bexley_garden.t
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ FixMyStreet::override_config {

subtest 'cancel garden subscription' => sub {
set_fixed_time('2024-02-01T00:00:00');
my $tomorrow = DateTime::Format::Strptime->new( pattern => '%d/%m/%Y' )->format_datetime( DateTime->now->add(days => 1) );

$agile_mock->mock( 'CustomerSearch', sub { {
Customers => [
Expand Down Expand Up @@ -383,7 +384,7 @@ FixMyStreet::override_config {
is $report->get_extra_field_value('customer_external_ref'),
'CUSTOMER_123';
is $report->get_extra_field_value('due_date'),
'12/12/2025';
$tomorrow;
is $report->get_extra_field_value('reason'),
'Other: Burnt all my leaves';

Expand Down Expand Up @@ -437,7 +438,7 @@ FixMyStreet::override_config {
is $report->get_extra_field_value('customer_external_ref'),
'CUSTOMER_123';
is $report->get_extra_field_value('due_date'),
'12/12/2025';
$tomorrow;
is $report->get_extra_field_value('reason'),
'Other: Burnt all my leaves';

Expand Down

0 comments on commit dc67712

Please sign in to comment.