Bugzilla – Attachment 122930 Details for
Bug 25619
Updating an expiration date for a waiting hold won't save
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25619: Unit Tests
Bug-25619-Unit-Tests.patch (text/plain), 2.47 KB, created by
Biblibre Sandboxes
on 2021-07-16 21:34:06 UTC
(
hide
)
Description:
Bug 25619: Unit Tests
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2021-07-16 21:34:06 UTC
Size:
2.47 KB
patch
obsolete
>From 0a1b5873d15394f5d61a7adabb583e7af5e8444a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 16 Jul 2021 14:26:37 -0400 >Subject: [PATCH] Bug 25619: Unit Tests > >Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us> >--- > t/db_dependent/Holds.t | 57 +++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 56 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 64419b5fee..9ec82e61f3 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -7,7 +7,7 @@ use t::lib::TestBuilder; > > use C4::Context; > >-use Test::More tests => 71; >+use Test::More tests => 72; > use MARC::Record; > > use C4::Biblio; >@@ -1610,3 +1610,58 @@ subtest 'CanItemBeReserved rule precedence tests' => sub { > $schema->storage->txn_rollback; > > }; >+ >+subtest 'CanItemBeReserved rule precedence tests' => sub { >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $category = $builder->build({ source => 'Category' }); >+ my $branch = $builder->build({ source => 'Branch' })->{ branchcode }; >+ my $biblio = $builder->build_sample_biblio( { itemtype => 'DUMMY' } ); >+ my $itemnumber = $builder->build_sample_item( >+ { library => $branch, biblionumber => $biblio->biblionumber } ) >+ ->itemnumber; >+ >+ my $borrowernumber = Koha::Patron->new( >+ { >+ firstname => 'my firstname', >+ surname => 'my surname ' . $_, >+ categorycode => $category->{categorycode}, >+ branchcode => $branch, >+ } >+ )->store->borrowernumber; >+ >+ my $reserve_id = AddReserve( >+ { >+ branchcode => $branch, >+ borrowernumber => $borrowernumber, >+ biblionumber => $biblio->biblionumber, >+ priority => >+ C4::Reserves::CalculatePriority( $biblio->biblionumber ), >+ itemnumber => $itemnumber, >+ } >+ ); >+ >+ my $hold = Koha::Holds->find($reserve_id); >+ >+ $hold->set( { priority => 0, found => 'W' } )->store(); >+ >+ ModReserve( >+ { >+ reserve_id => $hold->id, >+ expirationdate => '1981-06-10', >+ priority => 99, >+ rank => 0, >+ } >+ ); >+ >+ $hold = Koha::Holds->find($reserve_id); >+ >+ is( $hold->expirationdate, '1981-06-10', >+ 'Found hold expiration date updated correctly' ); >+ is( $hold->priority, '0', 'Found hold priority was not updated' ); >+ >+ $schema->storage->txn_rollback; >+ >+}; >-- >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 25619
:
122922
|
122923
|
122924
|
122929
|
122930
|
123043
|
123693
|
123694
|
123695
|
123779
|
124120
|
124121
|
124122
|
124123
|
124124