Bug 22433: Add debug statement to Transaction.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 9 May 2019 18:04:38 +0000 (13:04 -0500)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 10 May 2019 17:41:53 +0000 (17:41 +0000)
Hard to know what's going on here without more info. Adding this output
may help to investigate more.

Test plan:
Make sure the tests still pass

If it fails, please paste the output!!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

t/db_dependent/SIP/Transaction.t

index af3fa0a..0197c9c 100755 (executable)
@@ -86,8 +86,9 @@ subtest fill_holds_at_checkout => sub {
     is( ref $transaction, "C4::SIP::ILS::Transaction::Checkout", "New transaction created" );
     is( $transaction->patron( $sip_patron ), $sip_patron, "Patron assigned to transaction" );
     is( $transaction->item( $sip_item ), $sip_item, "Item assigned to transaction" );
-    $transaction->do_checkout();
-    is( $bib->holds->count(), 1, "Bib has 1 holds remaining");
+    my $checkout = $transaction->do_checkout();
+    use Data::Printer colored => 1; # Temporary debug statement
+    is( $bib->holds->count(), 1, "Bib has 1 holds remaining") or diag p $checkout;
 
     t::lib::Mocks::mock_preference('itemBarcodeInputFilter', 'whitespace');
     $sip_item   = C4::SIP::ILS::Item->new( ' barcode 4 test ');