Bugzilla – Attachment 59790 Details for
Bug 17982
Fix the use of uniq in sub themelanguage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17982: Expose wrong use of uniq
Bug-17982-Expose-wrong-use-of-uniq.patch (text/plain), 1.67 KB, created by
Jonathan Druart
on 2017-02-02 11:15:09 UTC
(
hide
)
Description:
Bug 17982: Expose wrong use of uniq
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-02 11:15:09 UTC
Size:
1.67 KB
patch
obsolete
>From 32cb7551b3e5481af39227d3845d91e9c1292ea6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 2 Feb 2017 08:40:58 +0100 >Subject: [PATCH] Bug 17982: Expose wrong use of uniq > >This test should fail without the patch fixing the uniq calls. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Templates.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Templates.t b/t/db_dependent/Templates.t >index 236bd1e..5c3b7c8 100755 >--- a/t/db_dependent/Templates.t >+++ b/t/db_dependent/Templates.t >@@ -19,8 +19,11 @@ use Modern::Perl; > > use CGI; > >-use Test::More tests => 5; >+use Test::More tests => 6; > use Test::Deep; >+use Test::MockModule; >+ >+use t::lib::Mocks; > > BEGIN { > use_ok( 'C4::Templates' ); >@@ -45,5 +48,15 @@ is( scalar @keys, 6, "GetColumnDefs correctly returns the 5 tables defined in co > my @tables = ( 'biblio', 'biblioitems', 'borrowers', 'items', 'statistics', 'subscription'); > cmp_deeply( \@keys, \@tables, "GetColumnDefs returns the expected tables"); > >+subtest 'Testing themelanguage for unique themes (BZ 17982)' => sub { >+ plan tests => 1; >+ >+ t::lib::Mocks::mock_preference('template', 'prog'); >+ my $module_language = Test::MockModule->new('C4::Languages'); >+ $module_language->mock( 'getlanguage', sub { return 'en'; } ); >+ >+ # This only triggers the first uniq but that is sufficient for now >+ cmp_deeply( ( C4::Templates::themelanguage( C4::Context->config('intrahtdocs'), 'about.tt' , 'intranet', 'fake_cgi' ) )[2], [ 'prog' ], 'We only expect one prog here' ); >+}; > > 1; >-- >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 17982
:
59511
|
59537
|
59630
|
59747
|
59748
|
59749
|
59750
|
59765
|
59766
| 59790 |
59791