Bugzilla – Attachment 130095 Details for
Bug 29759
Refund credit when cancelling an article request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29759: (follow-up) Fix api/v1/article_requests.t
Bug-29759-follow-up-Fix-apiv1articlerequestst.patch (text/plain), 1.82 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-02-02 12:51:03 UTC
(
hide
)
Description:
Bug 29759: (follow-up) Fix api/v1/article_requests.t
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-02-02 12:51:03 UTC
Size:
1.82 KB
patch
obsolete
>From 4091bccbd7237369dff8387362247907beda2011 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 2 Feb 2022 09:49:57 -0300 >Subject: [PATCH] Bug 29759: (follow-up) Fix api/v1/article_requests.t > >This patch makes the tests set debit_id to undef instead of random data. >This way tests don't break when $article_request->cancel is invoked and >a refund is tried. > >To test: >1. Run: > $ kshell > k$ prove t/db_dependent/Letters/TemplateToolkit.t >=> FAIL: Boo, tests fail, random garbage is not a debit >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/api/v1/article_requests.t | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/api/v1/article_requests.t b/t/db_dependent/api/v1/article_requests.t >index 02adbdf489..0bf1b8d73b 100755 >--- a/t/db_dependent/api/v1/article_requests.t >+++ b/t/db_dependent/api/v1/article_requests.t >@@ -57,8 +57,12 @@ subtest 'cancel() tests' => sub { > "//$userid:$password@/api/v1/article_requests/$deleted_article_request_id" > )->status_is(404)->json_is( { error => "Article request not found" } ); > >- my $article_request = >- $builder->build_object( { class => 'Koha::ArticleRequests' } ); >+ my $article_request = $builder->build_object( >+ { >+ class => 'Koha::ArticleRequests', >+ value => { debit_id => undef } >+ } >+ ); > > my $reason = 'A reason'; > my $notes = 'Some notes'; >@@ -131,7 +135,7 @@ subtest 'patron_cancel() tests' => sub { > my $article_request = $builder->build_object( > { > class => 'Koha::ArticleRequests', >- value => { borrowernumber => $patron->id } >+ value => { borrowernumber => $patron->id, debit_id => undef } > } > ); > >-- >2.32.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 29759
:
128874
|
128875
|
129162
|
129163
|
129181
|
129182
|
129297
|
129298
|
129302
|
129303
|
129304
|
130093
|
130094
|
130095
|
130096