Bug 35398: Add unit test for extraction of library_rotation_plan

This unit test addition adds an LRP segment to the test EDI message file
and adds the corresponding test to confirm is it extracted into the
field as expected.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6744b9979a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2024-02-27 13:45:53 +00:00 committed by Fridolin Somers
parent 1b11a323f5
commit 425bc1240b
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@ use strict;
use warnings;
use FindBin qw( $Bin );
use Test::More tests => 40;
use Test::More tests => 41;
use Koha::EDI;
BEGIN { use_ok('Koha::Edifact') }
@ -124,6 +124,9 @@ is( $y, 'ANF', 'Sequence code returned' );
$y = $ol->girfield( 'stock_category', 4 );
is( $y, 'RS', 'Copy stock category returned' );
$y = $ol->girfield( 'library_rotation_plan', 0);
is( $y, 'WRPC2', 'Library rotation plan returned' );
# test internal routines for prices
my $dp = Koha::EDI::_discounted_price(33.0, 9);
is( $dp, 6.03, 'Discount calculated' );

File diff suppressed because one or more lines are too long