View | Details | Raw Unified | Return to bug 22049
Collapse All | Expand All

(-)a/t/db_dependent/Circulation/MarkIssueReturned.t (-3 / +2 lines)
Lines 69-75 subtest 'Failure tests' => sub { Link Here
69
    is( $issue_id, undef, 'No issue_id returned' );
69
    is( $issue_id, undef, 'No issue_id returned' );
70
70
71
    # In the next call we return the item and try it another time
71
    # In the next call we return the item and try it another time
72
    $issue = C4::Circulation::AddIssue( $patron, $item->barcode );
72
    $issue = C4::Circulation::AddIssue( $patron->unblessed, $item->barcode );
73
    eval { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, undef, 0 ) };
73
    eval { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, undef, 0 ) };
74
    is( $issue_id, $issue->issue_id, "Item has been returned (issue $issue_id)" );
74
    is( $issue_id, $issue->issue_id, "Item has been returned (issue $issue_id)" );
75
    eval { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, undef, 0 ) };
75
    eval { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, undef, 0 ) };
Lines 172-178 subtest 'Manually pass a return date' => sub { Link Here
172
    my $old_checkout = Koha::Old::Checkouts->find( $issue_id );
172
    my $old_checkout = Koha::Old::Checkouts->find( $issue_id );
173
    is( $old_checkout->returndate, '2018-12-25 00:00:00', 'Manually passed date stored correctly' );
173
    is( $old_checkout->returndate, '2018-12-25 00:00:00', 'Manually passed date stored correctly' );
174
174
175
    $issue = C4::Circulation::AddIssue( $patron, $item->barcode );
175
    $issue = C4::Circulation::AddIssue( $patron->unblessed, $item->barcode );
176
176
177
    throws_ok
177
    throws_ok
178
        { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, 'bad_date', 0 ); }
178
        { $issue_id = C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item->itemnumber, 'bad_date', 0 ); }
179
- 

Return to bug 22049