From c86e6af6d750be2b4ddff6c9fe750afc2781257f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 8 Sep 2025 10:38:29 +0200 Subject: [PATCH] Bug 40765: Prevent acquisition tests to fail if order.quantity = 0 When using TestBuilder to build an order the tests will fail when the object will be saved: 00:09:41 koha-1 | # Looks like you planned 58 tests but ran 26. 00:09:41 koha-1 | 00:09:41 koha-1 | # Failed test 'cancel() tests' 00:09:41 koha-1 | # at t/db_dependent/Koha/Acquisition/Order.t line 1042. 00:09:41 koha-1 | Cannot insert order: Mandatory parameter quantity is missing at t/db_dependent/Koha/Acquisition/Order.t line 868. 00:09:41 koha-1 | # Looks like your test exited with 255 just after 14. 00:09:41 koha-1 | [22:03:54] t/db_dependent/Koha/Acquisition/Order.t This happened on Koha_Main/3350 --- t/lib/TestBuilder.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index 71a86984f2d..e5bdfde6b49 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -696,6 +696,9 @@ sub _gen_default_values { sort1_authcat => undef, sort2_authcat => undef, }, + Aqorder => { + quantity => 1, + }, AuthHeader => { marcxml => '', }, -- 2.34.1