Bug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 16 Nov 2018 09:04:55 +0000 (10:04 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 5 Dec 2018 08:00:41 +0000 (09:00 +0100)
Kind of funny that we did not touch this test here. But it passed!
Trivial fixes:
[1] Typo precessfee
[2] Typo the linked
[3] Add rollback

Test plan:
Run t/db_dependent/Circulation/Chargelostitem.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fab9936ddb68e15cae356cb4c52a3be806948f83)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
(cherry picked from commit 2d1332938c2bfc0df44afbc332dcfa2657ffad75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

t/db_dependent/Circulation/Chargelostitem.t

index c246fc1..b5af7db 100644 (file)
@@ -68,8 +68,8 @@ C4::Accounts::chargelostitem( $borrowernumber, $issue->{itemnumber}, '1.00');
 
 my $accountline = Koha::Account::Lines->search( { borrowernumber => $borrowernumber, accounttype => 'PF' } )->next();
 
-is( int($accountline->amount), int($itemtype->{processfee}), "The accountline amount should be precessfee value " );
-is( $accountline->itemnumber, $itemnumber1, "The accountline itemnumber should the linked with barcode '0101'" );
+is( int($accountline->amount), int($itemtype->{processfee}), "The accountline amount should be processfee value " );
+is( $accountline->itemnumber, $itemnumber1, "The accountline itemnumber should be linked with barcode '0101'" );
 is( $accountline->note, C4::Context->preference("ProcessingFeeNote"), "The accountline description should be 'test'" );
 
 my $lost_ao = Koha::Account::Offsets->search( { type => 'Lost Item' } );
@@ -77,3 +77,5 @@ is( $lost_ao->count, 1, 'Account offset of type "Lost Item" created' );
 
 my $processing_fee_ao = Koha::Account::Offsets->search( { type => 'Processing Fee' } );
 is( $processing_fee_ao->count, 1, 'Account offset of type "Processing Fee" created' );
+
+$schema->storage->txn_rollback;