File: | t/AuthoritiesMarc_MARC21.t |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | time | code |
---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | |||||
2 | # | |||||
3 | # This Koha test module is a stub! | |||||
4 | # Add more tests here!!! | |||||
5 | ||||||
6 | 1 1 1 | 1.33283517746448e+15 2 39 | use strict; | |||
7 | 1 1 1 | 5 1 34 | use warnings; | |||
8 | ||||||
9 | 1 1 1 | 226 18843 41 | use Test::More tests => 4; | |||
10 | 1 1 1 | 1657 7582 70 | use MARC::Record; | |||
11 | ||||||
12 | BEGIN { | |||||
13 | 1 | 8 | use_ok('C4::AuthoritiesMarc::MARC21'); | |||
14 | } | |||||
15 | ||||||
16 | 1 | 192019 | my @result = C4::AuthoritiesMarc::MARC21::default_auth_type_location(); | |||
17 | 1 | 7 | ok($result[0] eq '942', "testing default_auth_type_location has first value '942'"); | |||
18 | 1 | 831 | ok($result[1] eq 'a', "testing default_auth_type_location has first value 'a'"); | |||
19 | ||||||
20 | 1 | 331 | my $marc_record = MARC::Record->new(); | |||
21 | 1 | 28 | is(C4::AuthoritiesMarc::MARC21::fix_marc21_auth_type_location($marc_record, '', ''), undef, "testing fix_marc21_auth_type_location returns undef with empty MARC record"); |