From d6ac1049a84f93dc8cd7fc094c647f22b425ccdf Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 1 Mar 2017 10:40:20 +0000 Subject: [PATCH] Bug 14576 - (QA Followup) Fix Returns.t Two warnings, not one --- t/db_dependent/Circulation/Returns.t | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t index 50975a8..e81e533 100644 --- a/t/db_dependent/Circulation/Returns.t +++ b/t/db_dependent/Circulation/Returns.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 3; +use Test::More tests => 2; use Test::MockModule; use Test::Warn; @@ -124,9 +124,9 @@ subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub { warning_like { AddIssue( $borrower, $item_without_itemtype->{ barcode } ) } 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'; + warnings_like { AddReturn( $item_without_itemtype->{ barcode }, $branch ) } + [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 warnings on AddReturn'; # Test biblio-level itemtype was recorded on the 'statistics' table $stat = $schema->resultset('Statistic')->search({ branch => $branch, @@ -221,4 +221,6 @@ subtest "AddReturn logging on statistics table (item-level_itypes=0)" => sub { "biblio-level itype recorded on statistics for return"); }; +$schema->storage->txn_rollback; + 1; -- 2.1.4