Bugzilla – Attachment 97947 Details for
Bug 22806
CanBookBeReserve and CanItemBeReserve do not check AllowHoldsOnPatronsPossessions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22806: Unit Tests
Bug-22806-Unit-Tests.patch (text/plain), 1.79 KB, created by
Arthur Suzuki
on 2020-01-25 23:31:11 UTC
(
hide
)
Description:
Bug 22806: Unit Tests
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2020-01-25 23:31:11 UTC
Size:
1.79 KB
patch
obsolete
>From 5b4a5712d40b741ee8a5bb644f89ec392e6389a0 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Wed, 8 Jan 2020 14:20:38 +0100 >Subject: [PATCH] Bug 22806: Unit Tests > >--- > t/db_dependent/ILSDI_Services.t | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index 430d900c77..4a5723dc00 100644 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -302,7 +302,7 @@ subtest 'LookupPatron test' => sub { > > subtest 'Holds test' => sub { > >- plan tests => 5; >+ plan tests => 7; > > $schema->storage->txn_begin; > >@@ -418,6 +418,7 @@ subtest 'Holds test' => sub { > source => 'Item', > value => { > biblionumber => $biblio3->{biblionumber}, >+ barcode => '123456789', > damaged => 0, > } > }); >@@ -448,6 +449,19 @@ subtest 'Holds test' => sub { > $reply = C4::ILSDI::Services::HoldItem( $query ); > is( $reply->{code}, 'damaged', "Item is damaged" ); > >+ t::lib::Mocks::mock_preference( 'AllowHoldsOnPatronsPossessions', '0' ); >+ >+ my $mock_patron = $builder->build_object( { class => 'Koha::Patrons' } ); >+ t::lib::Mocks::mock_userenv( { patron => $mock_patron } ); # For AddIssue >+ my $checkout = C4::Circulation::AddIssue( $mock_patron->unblessed, $item->{barcode} ); >+ >+ $query->param( 'patron_id', $mock_patron->borrowernumber); >+ $query->param( 'bib_id', $biblio3->{biblionumber}); >+ $query->param( 'item_id', $item3->{itemnumber}); >+ $reply = C4::ILSDI::Services::HoldItem( $query ); >+ is( $reply->{code}, 'itemAlreadyOnLoan', "Patron has issued same book" ); >+ is( $reply->{pickup_location}, undef, "No reserve placed"); >+ > $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 22806
:
89039
|
89724
|
91784
|
94388
|
94389
|
97947
|
99881
|
99882
|
99883
|
99884
|
99885
|
100091
|
100092
|
100093
|
100173
|
100174
|
100175
|
106564
|
106778
|
106779
|
106780
|
107760
|
107806
|
110100
|
110101
|
110102
|
110973
|
110974
|
110975
|
110976
|
111771
|
111772
|
111773
|
111774
|
112824