Bugzilla – Attachment 85498 Details for
Bug 22049
MarkIssueReturned should rely on returndate only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22049: Do not pass Koha::Patron to AddIssue
Bug-22049-Do-not-pass-KohaPatron-to-AddIssue.patch (text/plain), 1.87 KB, created by
Jonathan Druart
on 2019-02-21 22:10:29 UTC
(
hide
)
Description:
Bug 22049: Do not pass Koha::Patron to AddIssue
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-02-21 22:10:29 UTC
Size:
1.87 KB
patch
obsolete
>From fa63dee8f99fe7654c5e7db719c1e72c4dfc18ed Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Feb 2019 18:03:21 -0300 >Subject: [PATCH] Bug 22049: Do not pass Koha::Patron to AddIssue > >The tests are not supposed to pass with such obvious mistake (?) > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Circulation/MarkIssueReturned.t | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation/MarkIssueReturned.t b/t/db_dependent/Circulation/MarkIssueReturned.t >index 8b9a6f9ea6..70924bca39 100644 >--- a/t/db_dependent/Circulation/MarkIssueReturned.t >+++ b/t/db_dependent/Circulation/MarkIssueReturned.t >@@ -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 ); } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22049
:
83542
|
83543
|
83544
|
83548
|
83549
|
83625
|
83626
|
83627
|
83654
|
83655
|
83656
|
83727
|
83728
|
83729
|
83730
| 85498