From f16a5a0de54b031228e2ce6b42f802e06e694203 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 5 Mar 2020 16:27:15 +0100 Subject: [PATCH] Bug 24813: Prevent api/v1/holds.t to fail randomly Hold cannot be suspended if found=W: Koha::Hold->suspend_hold 90 if ( $self->is_found ) { # We can't suspend found holds So when TestBuilder generate a hold with found=W the test fail. A question however: Why did not we have the correct exception displayed somewhere? That would be much more helpful to find the problem! --- t/db_dependent/api/v1/holds.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index df10cbca61..670f86de0e 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -392,7 +392,7 @@ subtest 'suspend and resume tests' => sub { my $hold = $builder->build_object( { class => 'Koha::Holds', - value => { suspend => 0, suspend_until => undef, waitingdate => undef } + value => { suspend => 0, suspend_until => undef, waitingdate => undef, found => '' } } ); -- 2.20.1