Bugzilla – Attachment 105254 Details for
Bug 24612
expirationdate blank if patron has more than one item from bib on hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24612: Fix existing ReserveSlip tests
Bug-24612-Fix-existing-ReserveSlip-tests.patch (text/plain), 4.28 KB, created by
Jonathan Druart
on 2020-05-22 09:27:40 UTC
(
hide
)
Description:
Bug 24612: Fix existing ReserveSlip tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-05-22 09:27:40 UTC
Size:
4.28 KB
patch
obsolete
>From c23df943a8143518a8a1f945f23a43dfa8d0dcc5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 22 May 2020 11:20:00 +0200 >Subject: [PATCH] Bug 24612: Fix existing ReserveSlip tests > >--- > t/db_dependent/Reserves.t | 6 ++--- > t/db_dependent/Reserves/ReserveSlip.t | 38 +++------------------------ > 2 files changed, 6 insertions(+), 38 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index c75a69ad95..e9f1de6f86 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -333,7 +333,7 @@ is( $messages->{ResFound}->{borrowernumber}, > $biblio = Koha::Biblios->find( $biblionumber ); > $holds = $biblio->holds; > is($holds->count, 1, "Only one reserves for this biblio"); >-my $reserve_id = $holds->next->reserve_id; >+$holds->next->reserve_id; > > # Tests for bug 9761 (ConfirmFutureHolds): new CheckReserves lookahead parameter, and corresponding change in AddReturn > # Note that CheckReserve uses its lookahead parameter and does not check ConfirmFutureHolds pref (it should be passed if needed like AddReturn does) >@@ -358,7 +358,7 @@ t::lib::Mocks::mock_preference('AllowHoldDateInFuture', 1); > my $resdate= dt_from_string(); > $resdate->add_duration(DateTime::Duration->new(days => 4)); > $resdate=output_pref($resdate); >-AddReserve( >+my $reserve_id = AddReserve( > { > branchcode => $branch_1, > borrowernumber => $requesters{$branch_1}, >@@ -411,7 +411,7 @@ is( > 'item that is captured to fill a hold cannot be deleted', > ); > >-my $letter = ReserveSlip( { branchcode => $branch_1, borrowernumber => $requesters{$branch_1}, biblionumber => $bibnum } ); >+my $letter = ReserveSlip( { branchcode => $branch_1, reserve_id => $reserve_id } ); > ok(defined($letter), 'can successfully generate hold slip (bug 10949)'); > > # Tests for bug 9788: Does Koha::Item->current_holds return a future wait? >diff --git a/t/db_dependent/Reserves/ReserveSlip.t b/t/db_dependent/Reserves/ReserveSlip.t >index 9b28179fcc..cd7a1936b4 100644 >--- a/t/db_dependent/Reserves/ReserveSlip.t >+++ b/t/db_dependent/Reserves/ReserveSlip.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 5; >+use Test::More tests => 3; > use t::lib::TestBuilder; > > use C4::Reserves qw( ReserveSlip ); >@@ -118,48 +118,16 @@ my $letter = $builder->build( > is ( ReserveSlip(), undef, "No hold slip returned if invalid or undef borrowernumber and/or biblionumber" ); > is ( ReserveSlip({ > branchcode => $library->{branchcode}, >- borrowernumber => $patron->{borrowernumber}, >- biblionumber => $biblio->{biblionumber}, >+ reserve_id => $hold1->reserve_id, > })->{code}, > 'HOLD_SLIP', "Get a hold slip from library, patron and biblio" ); > > is (ReserveSlip({ > branchcode => $library->{branchcode}, >- borrowernumber => $patron->{borrowernumber}, >- biblionumber => $biblio->{biblionumber}, >+ reserve_id => $hold1->reserve_id, > })->{content}, > "Hold found for $patron->{firstname}: Please pick up $biblio->{title} with barcode $item1->{barcode} at $library->{branchcode}.", "Hold slip contains correctly parsed content"); > >-is_deeply( >- ReserveSlip({ >- branchcode => $library->{branchcode}, >- borrowernumber => $patron->{borrowernumber}, >- biblionumber => $biblio->{biblionumber}, >- }), >- ReserveSlip({ >- branchcode => $library->{branchcode}, >- borrowernumber => $patron->{borrowernumber}, >- biblionumber => $biblio->{biblionumber}, >- itemnumber => $item1->{itemnumber}, >- barcode => $item1->{barcode}, >- }), >- "No item as param generate hold slip from first item in reserves"); >- >-isnt ( >- ReserveSlip({ >- branchcode => $library->{branchcode}, >- borrowernumber => $patron->{borrowernumber}, >- biblionumber => $biblio->{biblionumber}, >- })->{content}, >- ReserveSlip({ >- branchcode => $library->{branchcode}, >- borrowernumber => $patron->{borrowernumber}, >- biblionumber => $biblio->{biblionumber}, >- itemnumber => $item2->{itemnumber}, >- barcode => $item2->{barcode}, >- })->{content}, >- "Item and/or barcode as params return correct pickup item in hold slip"); >- > $schema->storage->txn_rollback; > > 1; >-- >2.20.1
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 24612
:
98738
|
98739
|
102818
|
102819
|
102820
|
104803
|
104804
|
104805
|
105202
|
105203
|
105204
|
105253
|
105254
|
105775