Bugzilla – Attachment 150653 Details for
Bug 31856
Improve performance of serials subscriptions search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31856: Add test for get_description_by_category_and_authorised_value
Bug-31856-Add-test-for-getdescriptionbycategoryand.patch (text/plain), 1.90 KB, created by
Jonathan Druart
on 2023-05-04 12:09:44 UTC
(
hide
)
Description:
Bug 31856: Add test for get_description_by_category_and_authorised_value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-04 12:09:44 UTC
Size:
1.90 KB
patch
obsolete
>From f8acff5f31bc3b215348635d8acf21da64a8755e Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Wed, 19 Oct 2022 16:11:15 +0200 >Subject: [PATCH] Bug 31856: Add test for > get_description_by_category_and_authorised_value > >--- > t/db_dependent/AuthorisedValues.t | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/AuthorisedValues.t b/t/db_dependent/AuthorisedValues.t >index 91d3367e18f..2ccbae27723 100755 >--- a/t/db_dependent/AuthorisedValues.t >+++ b/t/db_dependent/AuthorisedValues.t >@@ -140,7 +140,7 @@ my @categories = Koha::AuthorisedValues->new->categories; > is( @categories, @existing_categories+3, 'There should have 3 categories inserted' ); > > subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_values' => sub { >- plan tests => 6; >+ plan tests => 7; > > my $test_cat = Koha::AuthorisedValueCategories->find('TEST'); > $test_cat->delete if $test_cat; >@@ -248,6 +248,7 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > ], > ); > }; >+ > subtest 'authorised_values' => sub { > > plan tests => 2; >@@ -279,6 +280,23 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v > > $schema->storage->txn_rollback; > }; >+ >+ subtest 'get_description_by_category_and_authorised_value' => sub { >+ plan tests => 1; >+ my $description = Koha::AuthorisedValues->get_description_by_category_and_authorised_value( >+ { >+ category => $av_0->category,, >+ authorised_value => $av_0->authorised_value, >+ } >+ ); >+ is_deeply( >+ $description, >+ { >+ lib => $av_0->lib, >+ opac_description => $av_0->lib_opac >+ } >+ ); >+ }; > }; > > $schema->storage->txn_rollback; >-- >2.25.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 31856
:
142058
|
142156
|
142157
|
150651
|
150652
| 150653 |
151077
|
151078