Bugzilla – Attachment 154860 Details for
Bug 31550
ILS-DI: Add OPAC description for some item fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31550: Add unit tests
Bug-31550-Add-unit-tests.patch (text/plain), 1.93 KB, created by
David Nind
on 2023-08-26 22:11:21 UTC
(
hide
)
Description:
Bug 31550: Add unit tests
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-08-26 22:11:21 UTC
Size:
1.93 KB
patch
obsolete
>From f10a963d25b848ad906b0ec89739f597655d5269 Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Fri, 11 Aug 2023 16:22:57 +0200 >Subject: [PATCH] Bug 31550: Add unit tests > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/AuthorisedValues.t | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/AuthorisedValues.t b/t/db_dependent/AuthorisedValues.t >index a1bf7b4812..940786e406 100755 >--- a/t/db_dependent/AuthorisedValues.t >+++ b/t/db_dependent/AuthorisedValues.t >@@ -189,7 +189,7 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > > }; > subtest 'find_by_koha_field' => sub { >- plan tests => 3; >+ plan tests => 4; > # Test authorised_value = 0 > my $av; > $av = Koha::AuthorisedValues->find_by_koha_field( { kohafield => 'items.restricted', authorised_value => 0 } ); >@@ -200,6 +200,15 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > # Test authorised_value = undef => we do not want to retrieve anything > $av = Koha::AuthorisedValues->find_by_koha_field( { kohafield => 'items.restricted', authorised_value => undef } ); > is( $av, undef, ); >+ # Test get authorised_value->opac_description if kohafield is in array >+ my @authorised_kohafields = ( 'location', 'ccode', 'permanent_location', 'notforloan', 'itemlost', 'withdrawn', 'damaged', 'restricted' ); >+ foreach my $kohafield (@authorised_kohafields) { >+ $av = Koha::AuthorisedValues->find_by_koha_field( { kohafield => 'items.' . $kohafield, authorised_value => 'location_1' } ); >+ if ($av) { >+ is( >+ $av->opac_description, 'location_1', "items.$kohafield description added correctly" ); >+ } >+ } > }; > subtest 'get_description_by_koha_field' => sub { > plan tests => 4; >-- >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 31550
:
140431
|
140432
|
144979
|
145041
|
145042
|
154370
|
154371
|
154372
|
154373
|
154374
|
154858
|
154859
| 154860