Skip to content
Snippets Groups Projects
Commit c43a9037 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- fix: testcase breaks xsl include path, updated test case

parent d52e0531
No related branches found
No related tags found
No related merge requests found
......@@ -648,7 +648,7 @@ if(! -d $output_path) { mkdir $output_path or die "Error creating directory: tmp
#~ └── tmp
#~ └── bagit
my $xsl_path = path(__FILE__)->parent->parent->child('xsl');
my $xsl_path = path(__FILE__)->parent->parent->child('xsl')->absolute();
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new('GET' => "https://sru.bsz-bw.de/swbf");
my $response = $ua->request($request);
......@@ -702,8 +702,8 @@ throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_utility("", $useragent_obj);
throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_utility($xsl_path, ""); } qr/invalid parameters/, "check_marc21_utility(), invalid parameters";
throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_utility(undef, $useragent_obj); } qr/xsl directory not defined/, "check_marc21_utility(\$xsl_dir, \$useragent), xsl_dir undef";
throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_utility($xsl_path, undef); } qr/user agent not defined/, "check_marc21_utility(\$xsl_dir, \$useragent), useragent undef";
#
is(SLUB::LZA::SIPBuilderBagIt::check_marc21_mods_xsl($xsl_path, $useragent_obj), 'xsl/MARC21slim2MODS3-6.patched.xsl' , "check_marc21_mods_xsl()");
# #
like(SLUB::LZA::SIPBuilderBagIt::check_marc21_mods_xsl($xsl_path, $useragent_obj), qr/xsl\/MARC21slim2MODS3-6\.patched\.xsl$/, "check_marc21_mods_xsl()");
throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_mods_xsl("", $useragent_obj); } qr/invalid parameters/, "check_marc21_mods_xsl(), invalid parameters";
throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_mods_xsl($xsl_path, ""); } qr/invalid parameters/, "check_marc21_mods_xsl(), invalid parameters";
throws_ok{ SLUB::LZA::SIPBuilderBagIt::check_marc21_mods_xsl(undef, $useragent_obj); } qr/xsl directory not defined/, "check_marc21_mods_xsl(\$xsl_dir, \$useragent), xsl_dir undef";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment