From 1993e98edf0c272d6d93e18292a5c8b79da4b458 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! Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit c405b03dd367adb7c1c274477865a7444f59c9e9) Signed-off-by: Lucas Gass --- 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 1374a7b159..eb5474dd8b 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -347,7 +347,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 => undef } } ); -- 2.39.2