Bugzilla – Attachment 58821 Details for
Bug 15905
Remove use of makepayment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15905 - Update unit tests
Bug-15905---Update-unit-tests.patch (text/plain), 1.75 KB, created by
Kyle M Hall (khall)
on 2017-01-11 14:57:50 UTC
(
hide
)
Description:
Bug 15905 - Update unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-01-11 14:57:50 UTC
Size:
1.75 KB
patch
obsolete
>From ff6bbaa6362ca0b54ecc06434d80a3dc2af12823 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 24 Feb 2016 16:10:48 +0000 >Subject: [PATCH] Bug 15905 - Update unit tests > >--- > t/db_dependent/Accounts.t | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index b24a386..fe3100c 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -24,6 +24,7 @@ use Test::Warn; > > use t::lib::TestBuilder; > >+use Koha::Account; > use Koha::Account::Lines; > use Koha::Account::Line; > >@@ -36,7 +37,6 @@ BEGIN { > > can_ok( 'C4::Accounts', > qw( >- makepayment > getnextacctno > chargelostitem > manualinvoice >@@ -303,7 +303,7 @@ subtest "Koha::Account::pay particular line tests" => sub { > is( $line4->amountoutstanding, "4.000000", "Line 4 was not paid" ); > }; > >-subtest "makepayment() tests" => sub { >+subtest "More Koha::Account::pay tests" => sub { > > plan tests => 6; > >@@ -330,13 +330,10 @@ subtest "makepayment() tests" => sub { > > is( $rs->count(), 1, 'Accountline created' ); > >+ my $account = Koha::Account->new( { patron_id => $borrowernumber } ); >+ my $line = Koha::Account::Lines->find( $accountline->{ accountlines_id } ); > # make the full payment >- makepayment( >- $accountline->{ accountlines_id }, $borrowernumber, >- $accountline->{ accountno }, $amount, >- $borrowernumber, $branch, 'A payment note' ); >- >- # TODO: someone should write actual tests for makepayment() >+ $account->pay({ lines => [$line], amount => $amount, library_id => $branch, note => 'A payment note' }); > > my $stat = $schema->resultset('Statistic')->search({ > branch => $branch, >-- >2.1.4
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 15905
:
48350
|
48351
|
52136
|
52150
|
52151
|
58821
|
58822
|
58831
|
58832
|
58841
|
58842
|
58843