Bugzilla – Attachment 139553 Details for
Bug 24295
C4::Circulation::GetTransfers should be removed, use Koha::Item->get_transfer instead
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24295: Replace mock in t/db_dependent/Search.t
Bug-24295-Replace-mock-in-tdbdependentSearcht.patch (text/plain), 2.06 KB, created by
Joonas Kylmälä
on 2022-08-21 19:27:33 UTC
(
hide
)
Description:
Bug 24295: Replace mock in t/db_dependent/Search.t
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-08-21 19:27:33 UTC
Size:
2.06 KB
patch
obsolete
>From a3bf9d39af850fd2dc513f0da4ac21382e87587e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 9 Nov 2021 11:38:06 +0000 >Subject: [PATCH] Bug 24295: Replace mock in t/db_dependent/Search.t >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Replace the mock of GetTransfers in this test with a mock of transfers >data > >Test plan >1/ Run t/db_dependent/Search.t >2/ Confirm it passes >3/ Apply patch >4/ Repeat steps 1-2 > >Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > t/db_dependent/Search.t | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t >index 9f14d3e26b..fc40bdde6d 100755 >--- a/t/db_dependent/Search.t >+++ b/t/db_dependent/Search.t >@@ -31,6 +31,7 @@ use Test::MockModule; > use Test::Warn; > use t::lib::Mocks; > use t::lib::Mocks::Zebra; >+use t::lib::TestBuilder; > > use Koha::Caches; > >@@ -686,14 +687,18 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' > > # make one of the test items appear to be in transit > my $circ_module = Test::MockModule->new('C4::Circulation'); >- $circ_module->mock('GetTransfers', sub { >- my $itemnumber = shift // -1; >- if ($itemnumber == 11) { >- return ('2013-07-19', 'MPL', 'CPL'); >- } else { >- return; >+ my $builder = t::lib::TestBuilder->new; >+ my $transfer = $builder->build( >+ { >+ source => 'Branchtransfer', >+ value => { >+ itemnumber => 11, >+ frombranch => 'MPL', >+ tobranch => 'CPL', >+ datesent => \'NOW()' >+ } > } >- }); >+ ); > > ($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0); > @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, >-- >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 24295
:
118242
|
118243
|
118244
|
118245
|
118246
|
118247
|
118248
|
118249
|
118250
|
118287
|
118295
|
118296
|
118297
|
118298
|
118299
|
118300
|
118301
|
118302
|
118303
|
118304
|
118305
|
118306
|
118307
|
118308
|
118309
|
118310
|
119854
|
119855
|
119856
|
119857
|
119858
|
119859
|
119860
|
119861
|
119862
|
119863
|
119864
|
119866
|
119867
|
127465
|
127466
|
127467
|
127468
|
127469
|
127470
|
127471
|
127472
|
127473
|
127474
|
127475
|
127476
|
127477
|
130430
|
130431
|
130432
|
130433
|
130434
|
130435
|
130436
|
130437
|
130438
|
130439
|
130440
|
130441
|
130442
|
139546
|
139547
|
139548
|
139549
|
139550
|
139551
|
139552
|
139553
|
139554
|
139555
|
139556
|
139557
|
139558
|
139655
|
139656
|
139657
|
139658
|
139659
|
139660
|
139661
|
139662
|
139663
|
139664
|
139665
|
139666
|
139667