Bugzilla – Attachment 142736 Details for
Bug 23012
Possibility to mark processing fee by default refund when item is found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23012: Fix t/db_dependent/Koha/Item.t
Bug-23012-Fix-tdbdependentKohaItemt.patch (text/plain), 1.52 KB, created by
Aleisha Amohia
on 2022-10-27 21:36:03 UTC
(
hide
)
Description:
Bug 23012: Fix t/db_dependent/Koha/Item.t
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2022-10-27 21:36:03 UTC
Size:
1.52 KB
patch
obsolete
>From 0468069992afa7ed441f53cd2b39bf339201a15c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 25 Oct 2022 14:56:23 -0300 >Subject: [PATCH] Bug 23012: Fix t/db_dependent/Koha/Item.t > >With the follow-up changes, the return value is no longer a scalar, but >a hashref, but the tests weren't updated accordingly. > >This patch fixes this situation. > >To test: >1. Run: > $ kshell > k$ prove t/db_dependent/Koha/Item.t >=> FAIL: Tests fail >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests pass! >4. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Item.t | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 0f9326e2722..cf438e4469c 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -1432,12 +1432,13 @@ subtest 'store() tests' => sub { > } > ); > >- my $lostreturn_policy = 'charge'; >- my $processingreturn_policy = 'refund'; >+ my $lostreturn_policy = { >+ lostreturn => 'charge', >+ processingreturn => 'refund' >+ }; > > my $mocked_circ_rules = Test::MockModule->new('Koha::CirculationRules'); > $mocked_circ_rules->mock( 'get_lostreturn_policy', sub { return $lostreturn_policy; } ); >- $mocked_circ_rules->mock( 'get_processingreturn_policy', sub { return $processingreturn_policy; } ); > > # simulate it was found > $item->set( { itemlost => 0 } )->store; >-- >2.20.1
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 23012
:
141627
|
141628
|
141629
|
141630
|
142046
|
142047
|
142048
|
142049
|
142113
|
142123
|
142124
|
142125
|
142126
|
142481
|
142482
|
142483
|
142484
|
142485
|
142486
|
142487
|
142575
|
142652
|
142693
| 142736 |
142737