Bugzilla – Attachment 156099 Details for
Bug 32496
Reduce unnecessary unblessings of objects in Circulation.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32496: (follow-up) Fix t/db_dependent/SIP/Message.t
Bug-32496-follow-up-Fix-tdbdependentSIPMessaget.patch (text/plain), 2.18 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-09-22 14:32:36 UTC
(
hide
)
Description:
Bug 32496: (follow-up) Fix t/db_dependent/SIP/Message.t
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-09-22 14:32:36 UTC
Size:
2.18 KB
patch
obsolete
>From c02ab605fa06e1cceafafc62c5172210cbdfba62 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 22 Sep 2023 11:32:19 -0300 >Subject: [PATCH] Bug 32496: (follow-up) Fix t/db_dependent/SIP/Message.t > >--- > t/db_dependent/SIP/Message.t | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index a8b4ef70bb4..2a105189d33 100755 >--- a/t/db_dependent/SIP/Message.t >+++ b/t/db_dependent/SIP/Message.t >@@ -246,13 +246,13 @@ subtest "Test patron_status_string" => sub { > > my $builder = t::lib::TestBuilder->new(); > my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; >- my $patron = $builder->build({ >- source => 'Borrower', >+ my $patron = $builder->build_object({ >+ class => 'Koha::Patrons', > value => { > branchcode => $branchcode, > }, > }); >- my $sip_patron = C4::SIP::ILS::Patron->new( $patron->{cardnumber} ); >+ my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); > > t::lib::Mocks::mock_userenv({ branchcode => $branchcode }); > >@@ -282,12 +282,21 @@ subtest "Test patron_status_string" => sub { > ); > AddIssue( $patron, $item2->barcode ); > >- is( Koha::Checkouts->search({ borrowernumber => $patron->{borrowernumber} })->count, 2, "Found 2 checkouts for this patron" ); >+ is( >+ Koha::Checkouts->search( { borrowernumber => $patron->borrowernumber } )->count, 2, >+ "Found 2 checkouts for this patron" >+ ); > > $item1->itemlost(1)->store(); > $item2->itemlost(2)->store(); > >- is( Koha::Checkouts->search({ borrowernumber => $patron->{borrowernumber}, 'itemlost' => { '>', 0 } }, { join => 'item'} )->count, 2, "Found 2 lost checkouts for this patron" ); >+ is( >+ Koha::Checkouts->search( >+ { borrowernumber => $patron->borrowernumber, 'itemlost' => { '>', 0 } }, { join => 'item' } >+ )->count, >+ 2, >+ "Found 2 lost checkouts for this patron" >+ ); > > my $server->{account}->{lost_block_checkout} = undef; > my $patron_status_string = C4::SIP::Sip::MsgType::patron_status_string( $sip_patron, $server ); >-- >2.42.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 32496
:
144722
|
144723
|
144789
|
144804
|
145024
|
145027
|
147158
|
147162
|
150614
|
153017
|
153018
|
153517
|
153518
|
153519
|
156059
|
156060
|
156061
|
156080
|
156081
|
156082
| 156099 |
156102
|
156103