Bug 19036: Add ability to enable credit number for only some credit types
[koha.git] / t / db_dependent / Heading_MARC21.t
bloba2ea2df0d56617f19129eb9bfcdf4239f284363e
1 #!/usr/bin/perl
3 # This Koha test module is a stub!
4 # Add more tests here!!!
6 use strict;
7 use warnings;
9 use Test::More tests => 5;
10 use C4::Context;
12 BEGIN {
13 use_ok('C4::Heading');
16 SKIP: {
17 skip "MARC21 heading tests not applicable to UNIMARC", 2 if C4::Context->preference('marcflavour') eq 'UNIMARC';
18 my $field = MARC::Field->new( '650', ' ', '0', a => 'Uncles', x => 'Fiction' );
19 my $heading = C4::Heading->new_from_field($field);
20 is($heading->display_form(), 'Uncles--Fiction', 'Display form generation');
21 is($heading->search_form(), 'Uncles generalsubdiv Fiction', 'Search form generation');
23 $field = MARC::Field->new( '830', ' ', '4', a => 'The dark is rising ;', v => '3' );
24 $heading = C4::Heading->new_from_field($field);
25 is($heading->display_form(), 'The dark is rising ;', 'Display form generation');
26 is($heading->search_form(), 'The dark is rising', 'Search form generation');