Bugzilla – Attachment 108525 Details for
Bug 19036
Number payment receipts / payment slips
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19036: Add missing test
Bug-19036-Add-missing-test.patch (text/plain), 1.81 KB, created by
Jonathan Druart
on 2020-08-18 15:38:11 UTC
(
hide
)
Description:
Bug 19036: Add missing test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-18 15:38:11 UTC
Size:
1.81 KB
patch
obsolete
>From 4be8c9d28c0cc977872ff9f461f8622e9ec70e81 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 18 Aug 2020 17:37:45 +0200 >Subject: [PATCH] Bug 19036: Add missing test > >--- > t/db_dependent/Koha/Account.t | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t >index 0dfc5f4400..493e1ba639 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -1051,8 +1051,8 @@ subtest 'Koha::Account::Line::apply() handles lost items' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'Koha::Account::pay() generates credit number' => sub { >- plan tests => 37; >+subtest 'Koha::Account::pay() generates credit number (Koha::Account::Line->store)' => sub { >+ plan tests => 38; > > $schema->storage->txn_begin; > >@@ -1062,6 +1062,7 @@ subtest 'Koha::Account::pay() generates credit number' => sub { > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $account = $patron->account; > >+ #t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode }); > my $context = Test::MockModule->new('C4::Context'); > $context->mock( 'userenv', { branch => $library->id } ); > >@@ -1109,5 +1110,16 @@ subtest 'Koha::Account::pay() generates credit number' => sub { > $accountline = Koha::Account::Lines->find($accountlines_id); > is($accountline->credit_number, undef); > >+ throws_ok { >+ Koha::Account::Line->new( >+ { >+ credit_type_code => $credit_type->code, >+ credit_number => 42 >+ } >+ )->store; >+ } >+ qr/AutoCreditNumber is enabled but credit_number is already defined!/, >+ 'Croaked on bad call to store'; >+ > $schema->storage->txn_rollback; > }; >-- >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 19036
:
99301
|
99302
|
99303
|
99676
|
101549
|
101550
|
101896
|
101897
|
106278
|
106279
|
106280
|
106281
|
106767
|
107872
|
107875
|
107877
|
108323
|
108324
|
108325
|
108326
|
108327
|
108328
|
108329
| 108525 |
108587
|
108733