From 62a96fe4a160ef8fe32d4435a6aea6b02b4ba8f2 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 11 Jul 2024 17:37:58 +0000 Subject: [PATCH] Bug 37316: Adjust tests Signed-off-by: Eric Garcia Signed-off-by: Martin Renvoize --- t/db_dependent/Koha/Item.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t index 5b21086e227..bd4748bb869 100755 --- a/t/db_dependent/Koha/Item.t +++ b/t/db_dependent/Koha/Item.t @@ -858,14 +858,18 @@ subtest 'store check barcodes' => sub { ); $item->barcode("")->store(); - is( $item->barcode, undef, 'Empty string barcodes are treated as undef'); + $item->discard_changes; + is( $item->barcode, undef, 'Empty string barcodes are treated as undef' ); $item->barcode("123456789")->store(); - is( $item->barcode, "123456789", 'Non-empty string barcodes are unchanged'); + $item->discard_changes; + is( $item->barcode, "123456789", 'Non-empty string barcodes are unchanged' ); $item->barcode(undef)->store(); - is( $item->barcode, undef, 'undef barcodes remain undef'); + $item->discard_changes; + is( $item->barcode, undef, 'undef barcodes remain undef' ); }; + subtest 'deletion' => sub { plan tests => 15; -- 2.45.2