Bugzilla – Attachment 117386 Details for
Bug 27808
Item's onloan column remains unset if a checked out item is issued to another patron without being returned first
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27808: Add unit tests
Bug-27808-Add-unit-tests.patch (text/plain), 2.11 KB, created by
Andrew Fuerste-Henry
on 2021-02-26 17:22:07 UTC
(
hide
)
Description:
Bug 27808: Add unit tests
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-02-26 17:22:07 UTC
Size:
2.11 KB
patch
obsolete
>From 8285341ffa23424b6b40b7870a9b174bb18c9de7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 26 Feb 2021 09:44:30 -0500 >Subject: [PATCH] Bug 27808: Add unit tests > >Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> > >Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org> >--- > t/db_dependent/Circulation.t | 31 ++++++++++++++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 97ca6492e2..85f29b6563 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > use utf8; > >-use Test::More tests => 52; >+use Test::More tests => 53; > use Test::Exception; > use Test::MockModule; > use Test::Deep qw( cmp_deeply ); >@@ -4738,6 +4738,35 @@ subtest 'AddIssue records staff who checked out item if appropriate' => sub { > is( $issue->issuer, $issuer->{borrowernumber}, "Staff who checked out the item recorded when RecordStaffUserOnCheckout turned on" ); > }; > >+subtest "Item's onloan value should be set if checked out item is checked out to a different patron" => sub { >+ plan tests => 2; >+ >+ my $library_1 = $builder->build_object( { class => 'Koha::Libraries' } ); >+ my $patron_1 = $builder->build_object( >+ { >+ class => 'Koha::Patrons', >+ value => { branchcode => $library_1->branchcode } >+ } >+ ); >+ my $patron_2 = $builder->build_object( >+ { >+ class => 'Koha::Patrons', >+ value => { branchcode => $library_1->branchcode } >+ } >+ ); >+ >+ my $item = $builder->build_sample_item( >+ { >+ library => $library_1->branchcode, >+ } >+ ); >+ >+ AddIssue( $patron_1->unblessed, $item->barcode ); >+ ok( $item->get_from_storage->onloan, "Item's onloan column is set after initial checkout" ); >+ AddIssue( $patron_2->unblessed, $item->barcode ); >+ ok( $item->get_from_storage->onloan, "Item's onloan column is set after second checkout" ); >+}; >+ > $schema->storage->txn_rollback; > C4::Context->clear_syspref_cache(); > $branches = Koha::Libraries->search(); >-- >2.11.0
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 27808
:
117380
|
117381
|
117382
|
117384
|
117385
|
117386
|
117387
|
117398
|
117399
|
117400
|
117443
|
117445
|
117446
|
117454
|
117456