From 2ed01da93c79dc912254a93761a294ef9e32aea5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 18 Nov 2022 15:31:10 +0100 Subject: [PATCH] Bug 32269: Prevent Circulation.t to fail randomly Highlighted by Bug 32030: fix test builder for boolean # Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore' # at t/db_dependent/Circulation.t line 343. # got: '2022-11-18T14:16:12' # expected: '2022-12-02T00:00:00' # Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore' # at t/db_dependent/Circulation.t line 349. # got: '2022-11-18T14:16:12' # expected: '2022-12-02T23:59:00' # Looks like you failed 2 tests of 5 We were reaching return $now Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- t/db_dependent/Circulation.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 339f5b6d61..be02501f42 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -5638,7 +5638,14 @@ subtest "GetSoonestRenewDate tests" => sub { rule_value => '7', } ); - my $patron = $builder->build_object({ class => 'Koha::Patrons' }); + my $patron = $builder->build_object( + { + class => 'Koha::Patrons', + value => { + autorenew_checkouts => 1, + } + } + ); my $item = $builder->build_sample_item(); my $issue = AddIssue( $patron->unblessed, $item->barcode); my $datedue = dt_from_string( $issue->date_due() ); -- 2.38.1