Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
|
4 |
|
5 |
use Test::More tests => 4; |
5 |
use Test::More tests => 6; |
6 |
use Test::MockModule; |
6 |
use Test::MockModule; |
7 |
use t::lib::Mocks; |
7 |
use t::lib::Mocks; |
8 |
use t::lib::TestBuilder; |
8 |
use t::lib::TestBuilder; |
Lines 62-67
AddIssue($borrower, '0101');
Link Here
|
62 |
AddIssue($borrower, '0203'); |
62 |
AddIssue($borrower, '0203'); |
63 |
|
63 |
|
64 |
# Begin tests... |
64 |
# Begin tests... |
|
|
65 |
Koha::Account::Offsets->delete(); |
65 |
my $issue = Koha::Checkouts->search( { borrowernumber => $borrowernumber } )->next()->unblessed(); |
66 |
my $issue = Koha::Checkouts->search( { borrowernumber => $borrowernumber } )->next()->unblessed(); |
66 |
C4::Accounts::chargelostitem( $borrowernumber, $issue->{itemnumber}, '1.00'); |
67 |
C4::Accounts::chargelostitem( $borrowernumber, $issue->{itemnumber}, '1.00'); |
67 |
|
68 |
|
Lines 70-72
my $accountline = Koha::Account::Lines->search( { borrowernumber => $borrowernum
Link Here
|
70 |
is( int($accountline->amount), $itemtype->{processfee}, "The accountline amount should be precessfee value " ); |
71 |
is( int($accountline->amount), $itemtype->{processfee}, "The accountline amount should be precessfee value " ); |
71 |
is( $accountline->itemnumber, $itemnumber1, "The accountline itemnumber should the linked with barcode '0101'" ); |
72 |
is( $accountline->itemnumber, $itemnumber1, "The accountline itemnumber should the linked with barcode '0101'" ); |
72 |
is( $accountline->note, C4::Context->preference("ProcessingFeeNote"), "The accountline description should be 'test'" ); |
73 |
is( $accountline->note, C4::Context->preference("ProcessingFeeNote"), "The accountline description should be 'test'" ); |
73 |
- |
74 |
|
|
|
75 |
my $lost_ao = Koha::Account::Offsets->single( { type => 'Lost Item' } ); |
76 |
ok( $lost_ao, 'Account offset of type "Lost Item" created' ); |
77 |
|
78 |
my $processing_fee_ao = Koha::Account::Offsets->single( { type => 'Processing Fee' } ); |
79 |
ok( $processing_fee_ao, 'Account offset of type "Processing Fee" created' ); |