View | Details | Raw Unified | Return to bug 8220
Collapse All | Expand All

(-)a/t/db_dependent/Circulation.t (-1 / +18 lines)
Lines 1-6 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Test::More tests => 15;
3
use Test::More tests => 16;
4
4
5
BEGIN {
5
BEGIN {
6
    use_ok('C4::Circulation');
6
    use_ok('C4::Circulation');
Lines 108-110 is( Link Here
108
    $CircControl,
108
    $CircControl,
109
    'CircControl reset to its initial value'
109
    'CircControl reset to its initial value'
110
);
110
);
111
112
# Test C4::Circulation::ProcessOfflinePayment
113
my $sth = C4::Context->dbh->prepare("SELECT COUNT(*) FROM accountlines WHERE amount = '-123.45' AND accounttype = 'Pay'");
114
$sth->execute();
115
my ( $original_count ) = $sth->fetchrow_array();
116
117
C4::Context->dbh->do("INSERT INTO borrowers ( cardnumber, surname, firstname, categorycode, branchcode ) VALUES ( '99999999999', 'Hall', 'Kyle', 'S', 'MPL' )");
118
119
C4::Circulation::ProcessOfflinePayment({ cardnumber => '99999999999', amount => '123.45' });
120
121
$sth->execute();
122
my ( $new_count ) = $sth->fetchrow_array();
123
124
ok( $new_count == $original_count  + 1, 'ProcessOfflinePayment makes payment correctly' );
125
126
C4::Context->dbh->do("DELETE FROM accountlines WHERE borrowernumber IN ( SELECT borrowernumber FROM borrowers WHERE cardnumber = '99999999999' )");
127
C4::Context->dbh->do("DELETE FROM borrowers WHERE cardnumber = '99999999999'");
(-)a/t/db_dependent/lib/KohaTest/Circulation.pm (-1 / +1 lines)
Lines 48-53 sub methods : Test( 1 ) { Link Here
48
                      CheckRepeatableSpecialHolidays
48
                      CheckRepeatableSpecialHolidays
49
                      CheckValidBarcode
49
                      CheckValidBarcode
50
                      ReturnLostItem
50
                      ReturnLostItem
51
                      ProcessOfflinePayment
51
                );
52
                );
52
    
53
    
53
    can_ok( $self->testing_class, @methods );    
54
    can_ok( $self->testing_class, @methods );    
54
- 

Return to bug 8220