From ae48fb3d3d5f18e28305c8501b8f0ee3992c7af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Sun, 3 Oct 2021 08:02:57 +0000 Subject: [PATCH] Bug 28734: (QA follow-up) Fix test imports and readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joonas Kylmälä --- t/db_dependent/Koha/Biblio.t | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t index ce67abe66f..f67ba269d5 100755 --- a/t/db_dependent/Koha/Biblio.t +++ b/t/db_dependent/Koha/Biblio.t @@ -22,8 +22,8 @@ use Test::More tests => 14; use C4::Biblio qw( AddBiblio ModBiblio ); use Koha::Database; use Koha::Acquisition::Orders; -use Koha::AuthorisedValueCategories; -use Koha::AuthorisedValues; +use Koha::AuthorisedValueCategory; +use Koha::AuthorisedValue; use Koha::MarcSubfieldStructures; use t::lib::TestBuilder; @@ -614,18 +614,15 @@ subtest 'get_marc_notes() MARC21 tests' => sub { is( $notes->[2]->{marcnote}, 'http://someserver.com', 'URL separated' ); is( $notes->[3]->{marcnote}, 'Note4 skipped on opac',"Not shows if not opac" ); is( $notes->[4]->{marcnote}, 'Note5', 'Fifth note' ); + is( $notes->[5]->{marcnote}, 'Description should show', 'Authorised value is correctly parsed to show description rather than code' ); is( @$notes, 6, 'No more notes' ); $notes = $biblio->get_marc_notes({ marcflavour => 'MARC21', opac => 1 }); is( $notes->[0]->{marcnote}, 'Note1', 'First note' ); is( $notes->[1]->{marcnote}, 'Note2', 'Second note' ); is( $notes->[2]->{marcnote}, 'http://someserver.com', 'URL separated' ); is( $notes->[3]->{marcnote}, 'Note5', 'Fifth note shows after fourth skipped' ); - is( @$notes, 5, 'No more notes' ); - - $notes = $biblio->get_marc_notes({ marcflavour => 'MARC21' }); - is( $notes->[5]->{marcnote}, 'Description should show', 'Authorised value is correctly parsed to show description rather than code' ); - $notes = $biblio->get_marc_notes({ marcflavour => 'MARC21', opac => 1 }); is( $notes->[4]->{marcnote}, 'Description should show OPAC', 'Authorised value is correctly parsed for OPAC to show description rather than code' ); + is( @$notes, 5, 'No more notes' ); $schema->storage->txn_rollback; }; -- 2.20.1