Bugzilla – Attachment 153413 Details for
Bug 33954
Add Koha::Biblio->opac_summary_html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33954: Add tests
Bug-33954-Add-tests.patch (text/plain), 1.78 KB, created by
Nick Clemens (kidclamp)
on 2023-07-13 16:09:51 UTC
(
hide
)
Description:
Bug 33954: Add tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-07-13 16:09:51 UTC
Size:
1.78 KB
patch
obsolete
>From 19a2b0fe23639a7e8fcd4d991ef48abda2838b5c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jun 2023 12:46:25 +0200 >Subject: [PATCH] Bug 33954: Add tests > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Koha/Biblio.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index d03506887e..4bc53195ec 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 26; >+use Test::More tests => 27; > use Test::Exception; > use Test::Warn; > >@@ -1144,6 +1144,30 @@ subtest 'ratings' => sub { > ok(1); > }; > >+subtest 'opac_summary_html' => sub { >+ >+ plan tests => 2; >+ >+ my $author = 'my author'; >+ my $title = 'my title'; >+ my $isbn = '9781250067128 | 125006712X'; >+ my $biblio = $builder->build_sample_biblio( { author => $author, title => $title } ); >+ $biblio->biblioitem->set( { isbn => '9781250067128 | 125006712X' } )->store; >+ >+ t::lib::Mocks::mock_preference( 'OPACMySummaryHTML', '' ); >+ is( $biblio->opac_summary_html, '', 'opac_summary_html returns empty string if pref is off' ); >+ >+ t::lib::Mocks::mock_preference( >+ 'OPACMySummaryHTML', >+ 'Replace {AUTHOR}, {TITLE}, {ISBN} AND {BIBLIONUMBER} please' >+ ); >+ is( >+ $biblio->opac_summary_html, >+ sprintf( 'Replace %s, %s, %s AND %s please', $author, $title, $biblio->normalized_isbn, $biblio->biblionumber ), >+ 'opac_summary_html replaces the different patterns' >+ ); >+}; >+ > sub component_record1 { > my $marc = MARC::Record->new; > $marc->append_fields( >-- >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 33954
:
152150
|
152151
|
153072
|
153073
| 153413 |
153414