Bugzilla – Attachment 185674 Details for
Bug 39482
Link to edit OpacLibraryInfo from library edit page broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39482: (follow-up) Adjust tests
Bug-39482-follow-up-Adjust-tests.patch (text/plain), 2.63 KB, created by
Lucas Gass (lukeg)
on 2025-08-21 22:18:06 UTC
(
hide
)
Description:
Bug 39482: (follow-up) Adjust tests
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-08-21 22:18:06 UTC
Size:
2.63 KB
patch
obsolete
>From 0d761e2ce38fc1efececef9aea83de2ff6d0d748 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 21 Aug 2025 22:17:20 +0000 >Subject: [PATCH] Bug 39482: (follow-up) Adjust tests > >--- > t/db_dependent/Koha/Library.t | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Koha/Library.t b/t/db_dependent/Koha/Library.t >index c37c402dac1..c17f62b3a8f 100755 >--- a/t/db_dependent/Koha/Library.t >+++ b/t/db_dependent/Koha/Library.t >@@ -97,7 +97,7 @@ subtest 'smtp_server() tests' => sub { > }; > > subtest 'opac_info tests' => sub { >- plan tests => 8; >+ plan tests => 14; > $schema->storage->txn_begin; > my $library01 = $builder->build_object( { class => 'Koha::Libraries' } ); > my $library02 = $builder->build_object( { class => 'Koha::Libraries' } ); >@@ -160,21 +160,27 @@ subtest 'opac_info tests' => sub { > > # Start testing > my @opac_info1 = $library01->opac_info->as_list; >- is( $opac_info1[0]->content, '2', 'specific library, default language' ); >+ is( scalar @opac_info1, 2, 'specific library returns 2' ); >+ ok( ( grep { $_->content eq '2' } @opac_info1 ), 'specific library, default language' ); > > my @opac_info2 = $library01->opac_info( { lang => 'nl-NL' } )->as_list; >- is( $opac_info2[0]->content, '3', 'specific library, specific language' ); >+ is( scalar @opac_info2, 2, 'specific library with nl-NL returns 2' ); >+ ok( ( grep { $_->content eq '3' } @opac_info2 ), 'specific library, specific language' ); > > my @opac_info3 = $library01->opac_info( { lang => 'nl-BE' } )->as_list; >- is( $opac_info3[0]->content, '2', 'specific library, unknown language' ); >+ is( scalar @opac_info3, 2, 'specific library with unknown language returns 2' ); >+ ok( ( grep { $_->content eq '2' } @opac_info3 ), 'specific library, unknown language' ); > > my @opac_info4 = $library02->opac_info->as_list; >+ is( scalar @opac_info4, 1, 'unknown library returns 1' ); > is( $opac_info4[0]->content, '1', 'unknown library, default language' ); > > my @opac_info5 = $library02->opac_info( { lang => 'fr-FR' } )->as_list; >- is( $opac_info5[0]->content, '4', 'unknown library, specific language' ); >+ is( scalar @opac_info5, 2, 'unknown library with fr-FR returns 2' ); >+ ok( ( grep { $_->content eq '4' } @opac_info5 ), 'unknown library, specific language' ); > > my @opac_info6 = $library02->opac_info( { lang => 'de-DE' } )->as_list; >+ is( scalar @opac_info6, 1, 'unknown library with unknown language returns 1' ); > is( $opac_info6[0]->content, '1', 'unknown library, unknown language' ); > > $html01->delete; >-- >2.39.5
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 39482
:
185452
|
185484
|
185561
| 185674