Bugzilla – Attachment 158323 Details for
Bug 34529
Offline circulation should be able to accept userid as well as cardnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34529: (QA follow-up) Add unit tests
Bug-34529-QA-follow-up-Add-unit-tests.patch (text/plain), 2.67 KB, created by
Kyle M Hall (khall)
on 2023-11-03 10:50:09 UTC
(
hide
)
Description:
Bug 34529: (QA follow-up) Add unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-11-03 10:50:09 UTC
Size:
2.67 KB
patch
obsolete
>From 14ae0179f5d41c7774bde02ed9ba42e20e9a85d7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 3 Nov 2023 06:46:58 -0400 >Subject: [PATCH] Bug 34529: (QA follow-up) Add unit tests > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../Circulation/OfflineCirculation.t | 53 ++++++++++++++++++- > 1 file changed, 51 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation/OfflineCirculation.t b/t/db_dependent/Circulation/OfflineCirculation.t >index b0006395bea..3ec4b81244b 100755 >--- a/t/db_dependent/Circulation/OfflineCirculation.t >+++ b/t/db_dependent/Circulation/OfflineCirculation.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 1; >+use Test::More tests => 2; > use Test::MockModule; > use Test::Warn; > >@@ -25,7 +25,7 @@ use t::lib::Mocks; > use t::lib::TestBuilder; > > use C4::Biblio qw( AddBiblio ); >-use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation GetOfflineOperation ); >+use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation GetOfflineOperation ProcessOfflineIssue ); > use C4::Context; > use C4::Reserves qw( AddReserve ); > use Koha::DateUtils qw( dt_from_string ); >@@ -55,6 +55,55 @@ my $dbh = C4::Context->dbh; > > my $builder = t::lib::TestBuilder->new(); > >+subtest "Bug 34529: Offline circulation should be able to accept userid as well as cardnumber" => sub { >+ >+ plan tests => 2; >+ >+ $dbh->do("DELETE FROM pending_offline_operations"); >+ >+ $branch = $builder->build( { source => 'Branch' } )->{branchcode}; >+ >+ my $borrower1 = $builder->build( >+ { >+ source => 'Borrower', >+ value => { branchcode => $branch } >+ } >+ ); >+ >+ my $biblio = t::lib::TestBuilder->new->build_sample_biblio; >+ my $item1 = $builder->build_sample_item( >+ { >+ biblionumber => $biblio->id, >+ library => $branch, >+ } >+ ); >+ my $item2 = $builder->build_sample_item( >+ { >+ biblionumber => $biblio->id, >+ library => $branch, >+ } >+ ); >+ >+ is( >+ ProcessOfflineIssue( >+ { >+ cardnumber => $borrower1->{cardnumber}, >+ barcode => $item1->barcode >+ } >+ ), >+ "Success.", >+ "ProcessOfflineIssue succeeds with cardnumber" >+ ); >+ is( >+ ProcessOfflineIssue( >+ { cardnumber => $borrower1->{userid}, barcode => $item2->barcode } >+ ), >+ "Success.", >+ "ProcessOfflineIssue succeeds with user id" >+ ); >+ >+ }; >+ > subtest "Bug 30114 - Koha offline circulation will always cancel the next hold when issuing item to a patron" => sub { > > plan tests => 3; >-- >2.30.2
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 34529
:
154403
|
154411
|
155969
|
155970
|
158140
|
158141
|
158321
|
158322
|
158323
|
158324
|
158380
|
158381
|
158382
|
158383