From 233974a2514ed7891d889624a86312e29e8f43e5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 May 2020 16:10:34 +0200 Subject: [PATCH] Bug 24161: (follow-up) Fix failing test (when running slow) The previous assumption was wrong, we just need to return the last one. The tests mean to have 2 different values in the claimed_on dates. Signed-off-by: Martin Renvoize --- t/db_dependent/Koha/Acquisition/Order.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Acquisition/Order.t b/t/db_dependent/Koha/Acquisition/Order.t index 7d1add94a4..3cbdc82b0e 100644 --- a/t/db_dependent/Koha/Acquisition/Order.t +++ b/t/db_dependent/Koha/Acquisition/Order.t @@ -373,7 +373,8 @@ subtest 'claim*' => sub { my $claim_1 = $order->claim; my $claim_2 = $order->claim; - $claim_2->claimed_on($now->clone->subtract(days => 1))->store; + $claim_1->claimed_on($now->clone->subtract(days => 1))->store; + $claim_2->claimed_on($now)->store; is( $order->claims->count, 2, '->claims should return the correct number of claims'); is( $order->claims_count, 2, '->claims_count should return the correct number of claims'); -- 2.39.5