Skip to content
Snippets Groups Projects
Commit f977c702 authored by bolkun's avatar bolkun
Browse files

Added tests for fallback to k10plusPPN

parent 4f9825e1
No related branches found
No related tags found
1 merge request!5Feature error coloring
......@@ -24,7 +24,7 @@ use strict;
use warnings;
use diagnostics;
use Test::More tests => 114;
use Test::More tests => 116;
use Test::Output;
use Test::Exception;
use Test::File;
......@@ -129,8 +129,10 @@ BEGIN {
}
my $exportToArchiveDate = "2020-08-05_10-26-11";
my $ppn = "457035137";
my $K10plus = "1655506501";
my $noppn = "";
my $marc21;
my $marc21_2;
my @addBagInfo = (
{'SLUBArchiv-sipVersion' => 'v2020.1'},
{'SLUBArchiv-externalWorkflow' => 'kitodo'},
......@@ -186,6 +188,8 @@ throws_ok{ SLUB::LZA::SIPBuilderBagIt::get_marc21_from("https://sru.bsz-bw.de/sw
#
ok( $marc21 = SLUB::LZA::SIPBuilderBagIt::get_marc21_from_catalogue($ppn), "get_marc21_from_catalogue(), valid");
like( $marc21, qr/<datafield tag="/, "get_marc21_from_catalogue(), valid");
ok( $marc21_2 = SLUB::LZA::SIPBuilderBagIt::get_marc21_from_catalogue($K10plus), "get_marc21_from_catalogue() K10plus, valid");
like( $marc21_2, qr/<datafield tag="/, "get_marc21_from_catalogue() K10plus, valid");
throws_ok{ SLUB::LZA::SIPBuilderBagIt::get_marc21_from_catalogue(""); } qr/ppn not defined/, "get_marc21_from_catalogue(), invalid";
throws_ok{ SLUB::LZA::SIPBuilderBagIt::get_marc21_from_catalogue(undef); } qr/ppn not defined/, "get_marc21_from_catalogue(), invalid";
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment