Bugzilla – Attachment 94561 Details for
Bug 22445
Ability to define a URL for custom cover images
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22445: Add tests for Koha::Biblio->custom_cover_image_url
Bug-22445-Add-tests-for-KohaBiblio-customcoverimag.patch (text/plain), 1.73 KB, created by
Martin Renvoize (ashimema)
on 2019-10-22 13:59:51 UTC
(
hide
)
Description:
Bug 22445: Add tests for Koha::Biblio->custom_cover_image_url
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-22 13:59:51 UTC
Size:
1.73 KB
patch
obsolete
>From b8450f13538d562cd3e16e3af6c4a512b4151f3d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 22 Oct 2019 14:56:25 +0100 >Subject: [PATCH] Bug 22445: Add tests for Koha::Biblio->custom_cover_image_url > >Sponsored-by: Orex Digital >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> >Signed-off-by: Hugo Agud <hagud@orex.es> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Michal Denar <black23@gmail.com> >Signed-off-by: Kyle Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/Biblios.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblios.t b/t/db_dependent/Koha/Biblios.t >index a3892c5468..09765228fd 100644 >--- a/t/db_dependent/Koha/Biblios.t >+++ b/t/db_dependent/Koha/Biblios.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 5; >+use Test::More tests => 6; > use Test::Exception; > > use C4::Items; >@@ -186,4 +186,19 @@ subtest 'can_be_transferred' => sub { > .' is not possible.'); > }; > >+subtest 'custom_cover_image_url' => sub { >+ plan tests => 1; >+ t::lib::Mocks::mock_preference( 'CustomCoverImagesURL', 'https://my_url/%isbn%_%issn%.png' ); >+ my $isbn = 'my_isbn'; >+ my $issn = 'my_issn'; >+ my $biblioitem = $builder->build_object( >+ { >+ class => 'Koha::Biblioitems', >+ value => { isbn => $isbn, issn => $issn } >+ } >+ ); >+ my $biblio = Koha::Biblios->find( $biblioitem->biblionumber ); >+ is( $biblio->custom_cover_image_url, "https://my_url/${isbn}_${issn}.png" ); >+}; >+ > $schema->storage->txn_rollback; >-- >2.20.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 22445
:
85925
|
85926
|
85927
|
85928
|
85929
|
85930
|
85931
|
85932
|
85933
|
85934
|
85935
|
85936
|
85937
|
85938
|
86214
|
86726
|
86727
|
87434
|
89973
|
89974
|
89975
|
89976
|
89977
|
89978
|
89979
|
89980
|
89981
|
89982
|
89983
|
89984
|
89985
|
89986
|
89987
|
89988
|
89989
|
89996
|
89997
|
89998
|
89999
|
90000
|
90001
|
90002
|
90003
|
90004
|
90005
|
90006
|
90007
|
90009
|
90010
|
90011
|
90012
|
90013
|
94227
|
94228
|
94229
|
94230
|
94231
|
94232
|
94233
|
94234
|
94235
|
94236
|
94237
|
94238
|
94239
|
94240
|
94241
|
94242
|
94243
|
94244
|
94559
|
94560
| 94561 |
94562
|
94563
|
94564
|
94566
|
94567
|
94568
|
94569
|
94570
|
94571
|
94572
|
94573
|
94574
|
94575
|
94576
|
94577