Bug 5327 added unit tests for C4/AuthoritiesMarc/MARC21.pm
authorJono Mingard <reason.koan@gmail.com>
Wed, 18 Jan 2012 22:03:59 +0000 (11:03 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 31 Jan 2012 16:21:47 +0000 (17:21 +0100)
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
t/AuthoritiesMarc_MARC21.t

index d83534a..fbf713a 100755 (executable)
@@ -6,9 +6,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 4;
+use MARC::Record;
 
 BEGIN {
         use_ok('C4::AuthoritiesMarc::MARC21');
 }
 
+my @result = C4::AuthoritiesMarc::MARC21::default_auth_type_location();
+ok($result[0] eq '942', "testing default_auth_type_location has first value '942'");
+ok($result[1] eq 'a', "testing default_auth_type_location has first value 'a'");
+
+my $marc_record = MARC::Record->new();
+is(C4::AuthoritiesMarc::MARC21::fix_marc21_auth_type_location($marc_record, '', ''), undef, "testing fix_marc21_auth_type_location returns undef with empty MARC record");