Bugzilla – Attachment 73266 Details for
Bug 20181
Allow plugins to add CSS and Javascript to OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20181: (follow-up) Ensure test runs
Bug-20181-follow-up-Ensure-test-runs.patch (text/plain), 2.10 KB, created by
Katrin Fischer
on 2018-03-25 20:02:32 UTC
(
hide
)
Description:
Bug 20181: (follow-up) Ensure test runs
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-03-25 20:02:32 UTC
Size:
2.10 KB
patch
obsolete
>From eb70d77900ff679c702ba7faa28b66cd26fcd4ed Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 13 Feb 2018 18:50:02 +0000 >Subject: [PATCH] Bug 20181: (follow-up) Ensure test runs > >If EnablePlugins was 0, this test before this patch fails. >After this patch, it passes. > >TEST PLAN >--------- >1) Apply all but this patch >2) Run the following commands > kshell > prove t/Koha_Template_Plugin_KohaPlugins.t > -- two tests fail, if you have the conf or syspref set to 0. >3) Apply this patch >4) Repeat step 2. > -- all tests pass, including the positive and negative case checks. >5) run koha qa test tools > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/Koha_Template_Plugin_KohaPlugins.t | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/t/Koha_Template_Plugin_KohaPlugins.t b/t/Koha_Template_Plugin_KohaPlugins.t >index 8100a63..723f07c 100755 >--- a/t/Koha_Template_Plugin_KohaPlugins.t >+++ b/t/Koha_Template_Plugin_KohaPlugins.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > >-use Test::More tests => 8; >+use Test::More tests => 10; > use CGI; > use File::Basename; > use File::Spec; >@@ -36,6 +36,12 @@ use_ok( 'Koha::Template::Plugin::KohaPlugins', 'Can use Koha::Template::Plugin:: > > ok( my $plugin = Koha::Template::Plugin::KohaPlugins->new(), 'Able to instantiate template plugin' ); > >+t::lib::Mocks::mock_preference('UseKohaPlugins',1); >+t::lib::Mocks::mock_config('enable_plugins',1); > ok( index( $plugin->get_plugins_opac_js, 'Koha::Plugin::Test::opac_js' ) != -1, 'Test plugin opac_js return value is part of code returned by get_plugins_opac_js' ); >- > ok( index( $plugin->get_plugins_opac_head, 'Koha::Plugin::Test::opac_head' ) != -1, 'Test plugin opac_head return value is part of code returned by get_plugins_opac_head' ); >+ >+t::lib::Mocks::mock_preference('UseKohaPlugins',0); >+t::lib::Mocks::mock_config('enable_plugins',0); >+is( $plugin->get_plugins_opac_js, q{}, 'Test plugin opac_js return value is empty' ); >+is( $plugin->get_plugins_opac_head, q{}, 'Test plugin opac_head return value is empty' ); >-- >2.1.4
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 20181
:
71481
|
71483
|
71563
|
71565
|
71566
|
71567
|
71568
|
71569
|
73264
|
73265
| 73266 |
73267
|
73417