Bugzilla – Attachment 151898 Details for
Bug 33789
Checkout information is missing when adding a credit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33789: Add unit test
Bug-33789-Add-unit-test.patch (text/plain), 1.79 KB, created by
Jonathan Druart
on 2023-06-01 07:36:14 UTC
(
hide
)
Description:
Bug 33789: Add unit test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-06-01 07:36:14 UTC
Size:
1.79 KB
patch
obsolete
>From 463c174c701b8ac96217b4ed3c59daa7b1c4dcb1 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 24 May 2023 18:38:42 +0000 >Subject: [PATCH] Bug 33789: Add unit test > >JD amended patch: Remove biblionumber => 144 > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/Account.t | 28 +++++++++++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t >index fbdb4414c68..2f2fe9bf272 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -182,7 +182,7 @@ subtest 'outstanding_credits() tests' => sub { > > subtest 'add_credit() tests' => sub { > >- plan tests => 21; >+ plan tests => 22; > > $schema->storage->txn_begin; > >@@ -294,6 +294,32 @@ subtest 'add_credit() tests' => sub { > # Disable cash registers > t::lib::Mocks::mock_preference( 'UseCashRegisters', 0 ); > >+ my $item = $builder->build_sample_item; >+ >+ my $checkout = Koha::Checkout->new( >+ { >+ borrowernumber => $patron->id, >+ itemnumber => $item->id, >+ date_due => \'NOW()', >+ branchcode => $patron->branchcode, >+ issuedate => \'NOW()', >+ } >+ )->store(); >+ >+ my $line_4 = $account->add_credit( >+ { >+ amount => 20, >+ description => 'Manual credit applied', >+ library_id => $patron->branchcode, >+ user_id => $patron->id, >+ type => 'FORGIVEN', >+ interface => 'commandline', >+ issue_id => $checkout->id >+ } >+ ); >+ >+ is( $line_4->issue_id, $checkout->id, 'The issue ID matches the checkout ID' ); >+ > $schema->storage->txn_rollback; > }; > >-- >2.25.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 33789
:
151498
|
151528
|
151650
|
151897
| 151898 |
152014