Merge branch 'bug_9554' into 3.12-master
[koha.git] / t / db_dependent / lib / KohaTest / Biblio / GetNoZebraIndexes.pm
1 package KohaTest::Biblio::GetNoZebraIndexes;
2 use base qw( KohaTest::Biblio );
3
4 use strict;
5 use warnings;
6
7 use Test::More;
8
9 use C4::Biblio;
10
11 =head2 STARTUP METHODS
12
13 These get run once, before the main test methods in this module
14
15 =cut
16
17
18 =head2 TEST METHODS
19
20 standard test methods
21
22 =head3 
23
24 =cut
25     
26 sub returns_expected_hashref : Test(2) {
27     my $self = shift;
28
29     my %nzi = C4::Biblio::GetNoZebraIndexes();
30     ok( scalar keys %nzi, 'got some keys from GetNoZebraIndexes' );
31
32     my %expected = (
33         'title'        => '130a,210a,222a,240a,243a,245a,245b,246a,246b,247a,247b,250a,250b,440a,830a',
34         'author'       => '100a,100b,100c,100d,110a,111a,111b,111c,111d,245c,700a,710a,711a,800a,810a,811a',
35         'isbn'         => '020a',
36         'issn'         => '022a',
37         'lccn'         => '010a',
38         'biblionumber' => '999c',
39         'itemtype'     => '942c',
40         'publisher'    => '260b',
41         'date'         => '260c',
42         'note'         => '500a,501a,504a,505a,508a,511a,518a,520a,521a,522a,524a,526a,530a,533a,538a,541a,546a,555a,556a,562a,563a,583a,585a,582a',
43         'subject'      => '600*,610*,611*,630*,650*,651*,653*,654*,655*,662*,690*',
44         'dewey'        => '082',
45         'bc'           => '952p',
46         'callnum'      => '952o',
47         'an'           => '6009,6109,6119',
48         'homebranch'   => '952a,952c'
49     );
50     is_deeply( \%nzi, \%expected, 'GetNoZebraIndexes returns the expected hashref' );
51 }
52
53 =head2 HELPER METHODS
54
55 These methods are used by other test methods, but
56 are not meant to be called directly.
57
58 =cut
59
60 =cut
61
62
63 =head2 SHUTDOWN METHODS
64
65 These get run once, after the main test methods in this module
66
67 =head3 
68
69 =cut
70
71
72 1;