Bugzilla – Attachment 14014 Details for
Bug 8220
Allow koc uploads to go to process queue instead of being applied directly.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8220 - QA Followup - Unit Test
Bug-8220---QA-Followup---Unit-Test.patch (text/plain), 2.17 KB, created by
Kyle M Hall (khall)
on 2012-12-11 19:48:09 UTC
(
hide
)
Description:
Bug 8220 - QA Followup - Unit Test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-12-11 19:48:09 UTC
Size:
2.17 KB
patch
obsolete
>From fc6956156dacd342c3c780d0bb7ab251f371e3f8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 11 Dec 2012 14:47:44 -0500 >Subject: [PATCH] Bug 8220 - QA Followup - Unit Test > >--- > t/db_dependent/Circulation.t | 19 ++++++++++++++++++- > t/db_dependent/lib/KohaTest/Circulation.pm | 1 + > 2 files changed, 19 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 8fab844..31e5960 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1,6 +1,6 @@ > #!/usr/bin/perl > >-use Test::More tests => 15; >+use Test::More tests => 16; > > BEGIN { > use_ok('C4::Circulation'); >@@ -108,3 +108,20 @@ is( > $CircControl, > 'CircControl reset to its initial value' > ); >+ >+# Test C4::Circulation::ProcessOfflinePayment >+my $sth = C4::Context->dbh->prepare("SELECT COUNT(*) FROM accountlines WHERE amount = '-123.45' AND accounttype = 'Pay'"); >+$sth->execute(); >+my ( $original_count ) = $sth->fetchrow_array(); >+ >+C4::Context->dbh->do("INSERT INTO borrowers ( cardnumber, surname, firstname, categorycode, branchcode ) VALUES ( '99999999999', 'Hall', 'Kyle', 'S', 'MPL' )"); >+ >+C4::Circulation::ProcessOfflinePayment({ cardnumber => '99999999999', amount => '123.45' }); >+ >+$sth->execute(); >+my ( $new_count ) = $sth->fetchrow_array(); >+ >+ok( $new_count == $original_count + 1, 'ProcessOfflinePayment makes payment correctly' ); >+ >+C4::Context->dbh->do("DELETE FROM accountlines WHERE borrowernumber IN ( SELECT borrowernumber FROM borrowers WHERE cardnumber = '99999999999' )"); >+C4::Context->dbh->do("DELETE FROM borrowers WHERE cardnumber = '99999999999'"); >diff --git a/t/db_dependent/lib/KohaTest/Circulation.pm b/t/db_dependent/lib/KohaTest/Circulation.pm >index b3a1ff8..2ec90b2 100644 >--- a/t/db_dependent/lib/KohaTest/Circulation.pm >+++ b/t/db_dependent/lib/KohaTest/Circulation.pm >@@ -48,6 +48,7 @@ sub methods : Test( 1 ) { > CheckRepeatableSpecialHolidays > CheckValidBarcode > ReturnLostItem >+ ProcessOfflinePayment > ); > > can_ok( $self->testing_class, @methods ); >-- >1.7.2.5
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 8220
:
10065
|
10189
|
10221
|
10587
|
11350
|
12310
|
14014
|
14452
|
16156
|
16157
|
16230
|
16232