From f977c702de3d6cc7e709502b7c04a73bb4148405 Mon Sep 17 00:00:00 2001
From: bolkun <bolkun@BDV092.slub-dresden.de>
Date: Fri, 30 Apr 2021 17:14:57 +0200
Subject: [PATCH] Added tests for fallback to k10plusPPN

---
 t/slubsipbuilderbagit.t | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/t/slubsipbuilderbagit.t b/t/slubsipbuilderbagit.t
index 94e0768..07a7d90 100644
--- a/t/slubsipbuilderbagit.t
+++ b/t/slubsipbuilderbagit.t
@@ -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";
 #
-- 
GitLab