Bugzilla – Attachment 83747 Details for
Bug 19945
ILSDI - Return the reason a reserve is impossible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19945: Add a test proving that using CanBookBeReserved in ILSDI::HoldItem is wrong.
Bug-19945-Add-a-test-proving-that-using-CanBookBeR.patch (text/plain), 2.27 KB, created by
Kyle M Hall (khall)
on 2019-01-09 14:55:36 UTC
(
hide
)
Description:
Bug 19945: Add a test proving that using CanBookBeReserved in ILSDI::HoldItem is wrong.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-01-09 14:55:36 UTC
Size:
2.27 KB
patch
obsolete
>From c10f320d7f90dfede3f3bca0b5c02669fe913b1d Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Tue, 18 Sep 2018 12:59:26 +0000 >Subject: [PATCH] Bug 19945: Add a test proving that using CanBookBeReserved in > ILSDI::HoldItem is wrong. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/ILSDI_Services.t | 48 ++++++++++++++++++++++++++++++++- > 1 file changed, 47 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index 6891660d31..049a8f8635 100644 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -299,7 +299,7 @@ subtest 'LookupPatron test' => sub { > > subtest 'Holds test' => sub { > >- plan tests => 3; >+ plan tests => 4; > > $schema->storage->txn_begin; > >@@ -388,5 +388,51 @@ subtest 'Holds test' => sub { > $reply = C4::ILSDI::Services::HoldItem( $query ); > is( $reply->{code}, 'tooManyReserves', "Too many reserves" ); > >+ my $biblio3 = $builder->build({ >+ source => 'Biblio', >+ }); >+ >+ my $biblioitems3 = $builder->build({ >+ source => 'Biblioitem', >+ value => { >+ biblionumber => $biblio3->{biblionumber}, >+ } >+ }); >+ >+ # Adding a holdable item to biblio 3. >+ my $item3 = $builder->build({ >+ source => 'Item', >+ value => { >+ biblionumber => $biblio3->{biblionumber}, >+ damaged => 0, >+ } >+ }); >+ >+ my $item4 = $builder->build({ >+ source => 'Item', >+ value => { >+ biblionumber => $biblio3->{biblionumber}, >+ damaged => 1, >+ } >+ }); >+ >+ my $issuingrule2 = $builder->build({ >+ source => 'Issuingrule', >+ value => { >+ categorycode => $patron->{categorycode}, >+ itemtype => $item3->{itype}, >+ branchcode => $patron->{branchcode}, >+ reservesallowed => 10, >+ } >+ }); >+ >+ $query = new CGI; >+ $query->param( 'patron_id', $patron->{borrowernumber}); >+ $query->param( 'bib_id', $biblio3->{biblionumber}); >+ $query->param( 'item_id', $item4->{itemnumber}); >+ >+ $reply = C4::ILSDI::Services::HoldItem( $query ); >+ is( $reply->{code}, 'damaged', "Item is damaged" ); >+ > $schema->storage->txn_rollback; > }; >-- >2.17.2 (Apple Git-113)
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 19945
:
70409
|
73351
|
73352
|
75688
|
75689
|
79046
|
79047
|
79048
|
79049
|
81371
|
81372
|
81373
|
81374
|
83745
|
83746
| 83747 |
83748