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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-09-08 10:38:29 +02:00 committed by Lucas Gass
parent 3f337c53ee
commit 621b75ddf0
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 3 additions and 0 deletions

View File

@ -696,6 +696,9 @@ sub _gen_default_values {
sort1_authcat => undef,
sort2_authcat => undef,
},
Aqorder => {
quantity => 1,
},
AuthHeader => {
marcxml => '',
},