Bug 23463: Getting less item-level_itypes warnings (?)
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Aug 2019 01:28:06 +0000 (20:28 -0500)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Mar 2020 09:26:32 +0000 (09:26 +0000)
So, we get less warnings. I do not really understand why...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
t/db_dependent/Circulation/Returns.t

index b1475fc..7675939 100644 (file)
@@ -143,15 +143,9 @@ subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub {
         "item-level itype recorded on statistics for return");
     warning_like { AddIssue( $borrower, $item_without_itemtype->{ barcode } ) }
                  [qr/^item-level_itypes set but no itemtype set for item/,
-                 qr/^item-level_itypes set but no itemtype set for item/,
-                 qr/^item-level_itypes set but no itemtype set for item/,
-                 qr/^item-level_itypes set but no itemtype set for item/,
-                 qr/^item-level_itypes set but no itemtype set for item/,
                  qr/^item-level_itypes set but no itemtype set for item/],
                  'Item without itemtype set raises warning on AddIssue';
-    warning_like { AddReturn( $item_without_itemtype->{ barcode }, $branch ) }
-                 qr/^item-level_itypes set but no itemtype set for item/,
-                 'Item without itemtype set raises warning on AddReturn';
+    AddReturn( $item_without_itemtype->{ barcode }, $branch );
     # Test biblio-level itemtype was recorded on the 'statistics' table
     $stat = $schema->resultset('Statistic')->search({
         branch     => $branch,