Bug 22049: Do not pass Koha::Patron to AddIssue
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Feb 2019 21:03:21 +0000 (18:03 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 22 Feb 2019 14:56:32 +0000 (14:56 +0000)
The tests are not supposed to pass with such obvious mistake (?)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

t/db_dependent/Circulation/MarkIssueReturned.t

index 8b9a6f9..70924bc 100644 (file)
@@ -69,7 +69,7 @@ subtest 'Failure tests' => sub {
     is( $issue_id, undef, 'No issue_id returned' );
 
     # In the next call we return the item and try it another time
-    $issue = C4::Circulation::AddIssue( $patron, $item->barcode );
+    $issue = C4::Circulation::AddIssue( $patron->unblessed, $item->barcode );
     eval { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, undef, 0 ) };
     is( $issue_id, $issue->issue_id, "Item has been returned (issue $issue_id)" );
     eval { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, undef, 0 ) };
@@ -172,7 +172,7 @@ subtest 'Manually pass a return date' => sub {
     my $old_checkout = Koha::Old::Checkouts->find( $issue_id );
     is( $old_checkout->returndate, '2018-12-25 00:00:00', 'Manually passed date stored correctly' );
 
-    $issue = C4::Circulation::AddIssue( $patron, $item->barcode );
+    $issue = C4::Circulation::AddIssue( $patron->unblessed, $item->barcode );
 
     throws_ok
         { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, 'bad_date', 0 ); }