Bug 18036: Perlcritic improve t/db_dependent/Templates.t
authorMark Tompsett <mtompset@hotmail.com>
Thu, 2 Feb 2017 17:16:01 +0000 (12:16 -0500)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Feb 2017 15:45:41 +0000 (15:45 +0000)
TEST PLAN
---------
1) apply 17982
2) perlcritic -3 t/db_dependent/Templates.t
   -- messages
3) apply this patch
4) perlcritic -3 t/db_dependent/Templates.t
   -- OK
5) run koha qa test tools

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

t/db_dependent/Templates.t

index 5c3b7c8..24bfd5d 100755 (executable)
@@ -43,10 +43,10 @@ my $columns = C4::Templates::GetColumnDefs( $query );
 
 is( ref( $columns ) eq 'HASH', 1, 'GetColumnDefs returns a hashref' );
 # get the tables names, sorted
-my @keys = sort keys %$columns;
-is( scalar @keys, 6, "GetColumnDefs correctly returns the 5 tables defined in columns.def" );
-my @tables = ( 'biblio', 'biblioitems', 'borrowers', 'items', 'statistics', 'subscription');
-cmp_deeply( \@keys, \@tables, "GetColumnDefs returns the expected tables");
+my @keys = sort keys %{$columns};
+is( scalar @keys, 6, 'GetColumnDefs correctly returns the 5 tables defined in columns.def' );
+my @tables = qw( 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;