Bug 20972: Add a testcase for bug 20972
Ensure all 10 characters of ISBN are preserved
And that ISBNs and EANs are correctly identidied in the PIA segment
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 82ce10dd28)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
7a14e9d6e4
commit
e2fbce6c71
13
t/Ediorder.t
13
t/Ediorder.t
|
|
@ -3,7 +3,7 @@ use strict;
|
|||
use warnings;
|
||||
use FindBin qw( $Bin );
|
||||
|
||||
use Test::More tests => 6;
|
||||
use Test::More tests => 8;
|
||||
|
||||
BEGIN { use_ok('Koha::Edifact::Order') }
|
||||
|
||||
|
|
@ -54,3 +54,14 @@ $data_to_encode .= '??';
|
|||
@segs = Koha::Edifact::Order::imd_segment( $code, $data_to_encode );
|
||||
cmp_ok( $segs[1], 'eq', q{IMD+L+010+:::CCCCCCCCCC??'},
|
||||
'IMD segment deals with quoted character at end' );
|
||||
|
||||
my $isbn = '3540556753';
|
||||
my $ean = '9783540556756';
|
||||
|
||||
my $seg = Koha::Edifact::Order::additional_product_id($isbn);
|
||||
cmp_ok( $seg, 'eq', q{PIA+5+3540556753:IB'},
|
||||
'isbn correctly encoded in PIA segment' );
|
||||
|
||||
$seg = Koha::Edifact::Order::additional_product_id($ean);
|
||||
cmp_ok( $seg, 'eq', q{PIA+5+9783540556756:EN'},
|
||||
'ean correctly encoded in PIA segment' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue