Bugzilla – Attachment 98395 Details for
Bug 22302
ITEMTYPECAT description doesn't fall back to description if OPAC description is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22302: Unit tests
Bug-22302-Unit-tests.patch (text/plain), 2.13 KB, created by
Nick Clemens (kidclamp)
on 2020-02-04 14:17:59 UTC
(
hide
)
Description:
Bug 22302: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-02-04 14:17:59 UTC
Size:
2.13 KB
patch
obsolete
>From 4e0a0aa2ded937843927985abdcfa249d0b7b5c6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 4 Feb 2020 14:15:36 +0000 >Subject: [PATCH] Bug 22302: Unit tests > >--- > t/db_dependent/Koha.t | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha.t b/t/db_dependent/Koha.t >index 4e814a0738..e21687830f 100644 >--- a/t/db_dependent/Koha.t >+++ b/t/db_dependent/Koha.t >@@ -240,13 +240,15 @@ subtest 'ISBN tests' => sub { > }; > > subtest 'GetItemTypesCategorized test' => sub{ >- plan tests => 7; >+ plan tests => 9; > > my $avc = Koha::AuthorisedValueCategories->find('ITEMTYPECAT'); > Koha::AuthorisedValueCategory->new({ category_name => 'ITEMTYPECAT' })->store unless $avc; > my $insertGroup = Koha::AuthorisedValue->new( > { category => 'ITEMTYPECAT', >- authorised_value => 'Quertyware', >+ authorised_value => 'Qwertyware', >+ lib => 'Keyboard software', >+ lib_opac => 'Computer stuff', > } > )->store; > >@@ -270,7 +272,8 @@ subtest 'GetItemTypesCategorized test' => sub{ > # add more data since GetItemTypesCategorized's search is more subtle > $insertGroup = Koha::AuthorisedValue->new( > { category => 'ITEMTYPECAT', >- authorised_value => 'Varyheavybook', >+ authorised_value => 'Veryheavybook', >+ lib => 'Weighty literature', > } > )->store; > >@@ -281,6 +284,9 @@ subtest 'GetItemTypesCategorized test' => sub{ > ok($hrCat->{Veryheavybook} && > $hrCat->{Veryheavybook}->{hideinopac}==1, 'GetItemTypesCategorized: non-visible category hidden' ); > >+ is( $hrCat->{Veryheavybook}->{description}, 'Weighty literature', 'A category with only lib description passes through'); >+ is( $hrCat->{Qwertyware}->{description}, 'Computer stuff', 'A category with lib_opac description uses that'); >+ > $insertSth->execute('BKghjklo5', 'An hidden book', 'Qwertyware', 1); > $hrCat = GetItemTypesCategorized(); > ok(exists $hrCat->{Qwertyware}, 'GetItemTypesCategorized: partially visible category exists'); >-- >2.11.0
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 22302
:
98395
|
98396
|
98410
|
98411
|
98443
|
98444