Bugzilla – Attachment 158382 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.72 KB, created by
Katrin Fischer
on 2023-11-04 13:11:29 UTC
(
hide
)
Description:
Bug 34529: (QA follow-up) Add unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-11-04 13:11:29 UTC
Size:
2.72 KB
patch
obsolete
>From 1a657ac60573b89feb01afe32039d5356dd6e5cd 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> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../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 b0006395be..3ec4b81244 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