Lines 22-29
use Test::More tests => 14;
Link Here
|
22 |
use C4::Biblio qw( AddBiblio ModBiblio ); |
22 |
use C4::Biblio qw( AddBiblio ModBiblio ); |
23 |
use Koha::Database; |
23 |
use Koha::Database; |
24 |
use Koha::Acquisition::Orders; |
24 |
use Koha::Acquisition::Orders; |
25 |
use Koha::AuthorisedValueCategories; |
25 |
use Koha::AuthorisedValueCategory; |
26 |
use Koha::AuthorisedValues; |
26 |
use Koha::AuthorisedValue; |
27 |
use Koha::MarcSubfieldStructures; |
27 |
use Koha::MarcSubfieldStructures; |
28 |
|
28 |
|
29 |
use t::lib::TestBuilder; |
29 |
use t::lib::TestBuilder; |
Lines 614-631
subtest 'get_marc_notes() MARC21 tests' => sub {
Link Here
|
614 |
is( $notes->[2]->{marcnote}, 'http://someserver.com', 'URL separated' ); |
614 |
is( $notes->[2]->{marcnote}, 'http://someserver.com', 'URL separated' ); |
615 |
is( $notes->[3]->{marcnote}, 'Note4 skipped on opac',"Not shows if not opac" ); |
615 |
is( $notes->[3]->{marcnote}, 'Note4 skipped on opac',"Not shows if not opac" ); |
616 |
is( $notes->[4]->{marcnote}, 'Note5', 'Fifth note' ); |
616 |
is( $notes->[4]->{marcnote}, 'Note5', 'Fifth note' ); |
|
|
617 |
is( $notes->[5]->{marcnote}, 'Description should show', 'Authorised value is correctly parsed to show description rather than code' ); |
617 |
is( @$notes, 6, 'No more notes' ); |
618 |
is( @$notes, 6, 'No more notes' ); |
618 |
$notes = $biblio->get_marc_notes({ marcflavour => 'MARC21', opac => 1 }); |
619 |
$notes = $biblio->get_marc_notes({ marcflavour => 'MARC21', opac => 1 }); |
619 |
is( $notes->[0]->{marcnote}, 'Note1', 'First note' ); |
620 |
is( $notes->[0]->{marcnote}, 'Note1', 'First note' ); |
620 |
is( $notes->[1]->{marcnote}, 'Note2', 'Second note' ); |
621 |
is( $notes->[1]->{marcnote}, 'Note2', 'Second note' ); |
621 |
is( $notes->[2]->{marcnote}, 'http://someserver.com', 'URL separated' ); |
622 |
is( $notes->[2]->{marcnote}, 'http://someserver.com', 'URL separated' ); |
622 |
is( $notes->[3]->{marcnote}, 'Note5', 'Fifth note shows after fourth skipped' ); |
623 |
is( $notes->[3]->{marcnote}, 'Note5', 'Fifth note shows after fourth skipped' ); |
623 |
is( @$notes, 5, 'No more notes' ); |
|
|
624 |
|
625 |
$notes = $biblio->get_marc_notes({ marcflavour => 'MARC21' }); |
626 |
is( $notes->[5]->{marcnote}, 'Description should show', 'Authorised value is correctly parsed to show description rather than code' ); |
627 |
$notes = $biblio->get_marc_notes({ marcflavour => 'MARC21', opac => 1 }); |
628 |
is( $notes->[4]->{marcnote}, 'Description should show OPAC', 'Authorised value is correctly parsed for OPAC to show description rather than code' ); |
624 |
is( $notes->[4]->{marcnote}, 'Description should show OPAC', 'Authorised value is correctly parsed for OPAC to show description rather than code' ); |
|
|
625 |
is( @$notes, 5, 'No more notes' ); |
629 |
|
626 |
|
630 |
$schema->storage->txn_rollback; |
627 |
$schema->storage->txn_rollback; |
631 |
}; |
628 |
}; |
632 |
- |
|
|