From 5579abe41f5ab6ce04761545efe1d423faa037d6 Mon Sep 17 00:00:00 2001 From: Jono Mingard Date: Thu, 19 Jan 2012 11:03:59 +1300 Subject: [PATCH] Bug 5327 added unit tests for C4/AuthoritiesMarc/MARC21.pm Signed-off-by: Chris Hall --- t/AuthoritiesMarc_MARC21.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/AuthoritiesMarc_MARC21.t b/t/AuthoritiesMarc_MARC21.t index d83534a515..fbf713ac66 100755 --- a/t/AuthoritiesMarc_MARC21.t +++ b/t/AuthoritiesMarc_MARC21.t @@ -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"); -- 2.39.5