Bugzilla – Attachment 160238 Details for
Bug 35588
marcrecord2csv retrieves authorised values incorrectly for fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Bug-35588-Tidy-up-tdbdependentAuthorisedValuest.patch (text/plain), 4.35 KB, created by
Julian Maurice
on 2023-12-22 13:33:05 UTC
(
hide
)
Description:
Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2023-12-22 13:33:05 UTC
Size:
4.35 KB
patch
obsolete
>From e01a10b55e12806cb03058b8c3c61d3119cc9207 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 22 Dec 2023 14:18:12 +0100 >Subject: [PATCH] Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/AuthorisedValues.t | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/AuthorisedValues.t b/t/db_dependent/AuthorisedValues.t >index 83332ac79b1..368e9e91863 100755 >--- a/t/db_dependent/AuthorisedValues.t >+++ b/t/db_dependent/AuthorisedValues.t >@@ -165,14 +165,17 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > Koha::MarcSubfieldStructure->new( { tagfield => 952, tagsubfield => 'c', frameworkcode => 'ACQ', authorised_value => 'TEST', kohafield => 'items.location' } )->store; > Koha::MarcSubfieldStructure->new( { tagfield => 952, tagsubfield => 'd', frameworkcode => '', authorised_value => 'ANOTHER_4_TESTS', kohafield => 'items.another_field' } )->store; > Koha::MarcSubfieldStructure->new( { tagfield => 952, tagsubfield => '5', frameworkcode => '', authorised_value => 'restricted_for_testing', kohafield => 'items.restricted' } )->store; >- Koha::MarcSubfieldStructure->new( { tagfield => '003', frameworkcode => '', authorised_value => 'CONTROL_TEST', } )->store; >+ Koha::MarcSubfieldStructure->new( { tagfield => '003', frameworkcode => '', authorised_value => 'CONTROL_TEST', } ) >+ ->store; > Koha::AuthorisedValue->new( { category => 'TEST', authorised_value => 'location_1', lib => 'location_1' } )->store; > Koha::AuthorisedValue->new( { category => 'TEST', authorised_value => 'location_2', lib => 'location_2' } )->store; > Koha::AuthorisedValue->new( { category => 'TEST', authorised_value => 'location_3', lib => 'location_3' } )->store; > Koha::AuthorisedValue->new( { category => 'ANOTHER_4_TESTS', authorised_value => 'an_av' } )->store; > Koha::AuthorisedValue->new( { category => 'ANOTHER_4_TESTS', authorised_value => 'another_av' } )->store; >+ > Koha::AuthorisedValue->new( { category => 'CONTROL_TEST', authorised_value => 'lib1', lib => 'lib1' } )->store; > Koha::AuthorisedValue->new( { category => 'CONTROL_TEST', authorised_value => 'lib2', lib => 'lib2' } )->store; >+ > subtest 'search_by_marc_field' => sub { > plan tests => 4; > my $avs; >@@ -262,8 +265,8 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > subtest 'get_descriptions_by_marc_field' => sub { > plan tests => 4; > >- my $control_descriptions = Koha::AuthorisedValues->get_descriptions_by_marc_field( >- { frameworkcode => '', tagfield => '003', } ); >+ my $control_descriptions = >+ Koha::AuthorisedValues->get_descriptions_by_marc_field( { frameworkcode => '', tagfield => '003', } ); > is_deeply( > $control_descriptions, > { >@@ -272,10 +275,13 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > }, > ); > >- my $control_descriptions_cached = Koha::AuthorisedValues->get_descriptions_by_marc_field( >- { frameworkcode => '', tagfield => '003', } ); >+ my $control_descriptions_cached = >+ Koha::AuthorisedValues->get_descriptions_by_marc_field( { frameworkcode => '', tagfield => '003', } ); > >- is("$control_descriptions","$control_descriptions_cached","Same memory address used proves cached control desc data"); >+ is( >+ "$control_descriptions", "$control_descriptions_cached", >+ "Same memory address used proves cached control desc data" >+ ); > > my $descriptions = Koha::AuthorisedValues->get_descriptions_by_marc_field( > { frameworkcode => '', tagfield => '952', tagsubfield => 'c' } ); >@@ -290,7 +296,7 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > > my $descriptions_cached = Koha::AuthorisedValues->get_descriptions_by_marc_field( > { frameworkcode => '', tagfield => '952', tagsubfield => 'c' } ); >- is("$descriptions","$descriptions_cached","Same memory address used proves cached desc data"); >+ is( "$descriptions", "$descriptions_cached", "Same memory address used proves cached desc data" ); > }; > > subtest 'authorised_values' => sub { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35588
:
159937
|
159978
|
160237
| 160238