Bugzilla – Attachment 123466 Details for
Bug 28554
In itemsearch sort filters by description
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28554: Fix t/db_dependent/AuthorisedValues.t
Bug-28554-Fix-tdbdependentAuthorisedValuest.patch (text/plain), 3.61 KB, created by
David Nind
on 2021-08-04 21:13:23 UTC
(
hide
)
Description:
Bug 28554: Fix t/db_dependent/AuthorisedValues.t
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-08-04 21:13:23 UTC
Size:
3.61 KB
patch
obsolete
>From 6124fc8a5445a08975b0dc395b3e9435258a58f3 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 3 Aug 2021 22:11:10 -1000 >Subject: [PATCH] Bug 28554: Fix t/db_dependent/AuthorisedValues.t > >Fixes where sort on lib breaks the test. > >Also removes useless params in search_by_koha_field() > >Run prove t/db_dependent/AuthorisedValues.t > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/AuthorisedValues.t | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/AuthorisedValues.t b/t/db_dependent/AuthorisedValues.t >index 3c22185e33..e16f1faa89 100755 >--- a/t/db_dependent/AuthorisedValues.t >+++ b/t/db_dependent/AuthorisedValues.t >@@ -159,9 +159,9 @@ subtest 'search_by_*_field + find_by_koha_field + get_description' => sub { > 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::AuthorisedValue->new( { category => 'TEST', authorised_value => 'location_1' } )->store; >- Koha::AuthorisedValue->new( { category => 'TEST', authorised_value => 'location_2' } )->store; >- Koha::AuthorisedValue->new( { category => 'TEST', authorised_value => 'location_3' } )->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; > subtest 'search_by_marc_field' => sub { >@@ -180,7 +180,7 @@ subtest 'search_by_*_field + find_by_koha_field + get_description' => sub { > my $avs; > $avs = Koha::AuthorisedValues->search_by_koha_field(); > is ( $avs, undef ); >- $avs = Koha::AuthorisedValues->search_by_koha_field( { kohafield => 'items.location', tagfield => 952, tagsubfield => 'c' } ); >+ $avs = Koha::AuthorisedValues->search_by_koha_field( { kohafield => 'items.location' } ); > is( $avs->count, 3, ); > is( $avs->next->authorised_value, 'location_1', ); > >@@ -236,15 +236,15 @@ subtest 'search_by_*_field + find_by_koha_field + get_description' => sub { > is_deeply( > \@descriptions, > [ >- { >- authorised_value => '', >- lib => $av_empty_string->lib, >- opac_description => $av_empty_string->lib_opac >- }, > { > authorised_value => $av_0->authorised_value, > lib => $av_0->lib, > opac_description => $av_0->lib_opac >+ }, >+ { >+ authorised_value => '', >+ lib => $av_empty_string->lib, >+ opac_description => $av_empty_string->lib_opac > } > ], > ); >-- >2.20.1
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 28554
:
121820
|
121821
|
121891
|
121892
|
121935
|
121936
|
123451
|
123464
|
123465
|
123466
|
124209
|
124210
|
124211