Bugzilla – Attachment 174795 Details for
Bug 38486
No block checkouts are still blocked by fines, checkouts, and blocked item types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38486: Fix unit tests
Bug-38486-Fix-unit-tests.patch (text/plain), 2.78 KB, created by
Kyle M Hall (khall)
on 2024-11-19 16:16:42 UTC
(
hide
)
Description:
Bug 38486: Fix unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-11-19 16:16:42 UTC
Size:
2.78 KB
patch
obsolete
>From ff3d869da2f27aaeffc1b3ae1378e7f148940261 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 19 Nov 2024 16:09:43 +0000 >Subject: [PATCH] Bug 38486: Fix unit tests > >--- > t/db_dependent/SIP/Transaction.t | 44 ++++++++++++++++++++------------ > 1 file changed, 28 insertions(+), 16 deletions(-) > >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index 56a810a7360..1294c16f4cd 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -858,10 +858,27 @@ subtest do_checkout_with_patron_blocked => sub { > }; > > subtest do_checkout_with_noblock => sub { >- plan tests => 3; >+ plan tests => 1; >+ >+ my $mockILS = Test::MockObject->new; >+ my $server = { ils => $mockILS }; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $patron = $builder->build_object( >+ >+ my $institution = { >+ id => $library->id, >+ implementation => "ILS", >+ policy => { >+ checkin => "true", >+ renewal => "true", >+ checkout => "true", >+ timeout => 100, >+ retries => 5, >+ } >+ }; >+ my $ils = C4::SIP::ILS->new($institution); >+ >+ my $patron = $builder->build_object( > { > class => 'Koha::Patrons', > value => { >@@ -871,7 +888,8 @@ subtest do_checkout_with_noblock => sub { > } > ); > >- t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode, flags => 1 } ); >+ t::lib::Mocks::mock_userenv( >+ { branchcode => $library->branchcode, flags => 1 } ); > > my $item = $builder->build_sample_item( > { >@@ -879,21 +897,15 @@ subtest do_checkout_with_noblock => sub { > } > ); > >- my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); >- my $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); >- my $co_transaction = C4::SIP::ILS::Transaction::Checkout->new(); >- is( >- $co_transaction->patron($sip_patron), >- $sip_patron, "Patron assigned to transaction" >- ); >- is( >- $co_transaction->item($sip_item), >- $sip_item, "Item assigned to transaction" >- ); >+ my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); >+ my $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); > >- $co_transaction->do_checkout( undef, '19990102 030405' ); >+ my $circ = >+ $ils->checkout( $patron->cardnumber, $item->barcode, undef, undef, >+ $server->{account}, '19990102 030405' ); > >- is( $patron->checkouts->count, 1, 'No Block checkout was performed for debarred patron' ); >+ is( $patron->checkouts->count, >+ 1, 'No Block checkout was performed for debarred patron' ); > }; > > subtest do_checkout_with_holds => sub { >-- >2.39.5 (Apple Git-154)
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 38486
:
174795
|
174796
|
175263
|
175264
|
175276
|
175277
|
175312
|
175313