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

(-)a/t/db_dependent/Circulation/Chargelostitem.t (-8 / +2 lines)
Lines 1-10 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
#
3
# This Koha test module is a stub!
4
# Add more tests here!!!
5
2
6
use strict;
7
use warnings;
8
use Modern::Perl;
3
use Modern::Perl;
9
4
10
use Test::MockModule;
5
use Test::MockModule;
Lines 56-62 if (@categories) { Link Here
56
    $categorycode = $categories[0]->{categorycode}
51
    $categorycode = $categories[0]->{categorycode}
57
} else {
52
} else {
58
    $categorycode = 'C';
53
    $categorycode = 'C';
59
    C4::Context->dbh->do(
54
    $dbh->do(
60
        "INSERT INTO categories(categorycode) VALUES(?)", undef, $categorycode);
55
        "INSERT INTO categories(categorycode) VALUES(?)", undef, $categorycode);
61
    $category_created = 1;
56
    $category_created = 1;
62
}
57
}
Lines 83-89 my @accountline = C4::Accounts::getcharges($borrowernumber); Link Here
83
is( scalar(@accountline), 1, 'accountline should have 1 row' );
78
is( scalar(@accountline), 1, 'accountline should have 1 row' );
84
is( int($accountline[0]->{amount}), $processfee, "The accountline amount should be precessfee value " );
79
is( int($accountline[0]->{amount}), $processfee, "The accountline amount should be precessfee value " );
85
is( $accountline[0]->{accounttype}, 'PF', "The accountline accounttype should be PF " );
80
is( $accountline[0]->{accounttype}, 'PF', "The accountline accounttype should be PF " );
86
is( $accountline[0]->{borrowernumber}, $borrowernumber, "The accountline borrowernumber should be the exemple borrownumber" );
81
is( $accountline[0]->{borrowernumber}, $borrowernumber, "The accountline borrowernumber should be the example borrowernumber" );
87
my $itemnumber = C4::Items::GetItemnumberFromBarcode('0101');
82
my $itemnumber = C4::Items::GetItemnumberFromBarcode('0101');
88
is( $accountline[0]->{itemnumber}, $itemnumber, "The accountline itemnumber should the linked with barcode '0101'" );
83
is( $accountline[0]->{itemnumber}, $itemnumber, "The accountline itemnumber should the linked with barcode '0101'" );
89
is( $accountline[0]->{description}, 'test ' . $issue->{itemnumber}, "The accountline description should be 'test'" );
84
is( $accountline[0]->{description}, 'test ' . $issue->{itemnumber}, "The accountline description should be 'test'" );
90
- 

Return to bug 12768