diff --git a/t/db_dependent/Context.t b/t/db_dependent/Context.t index 75e1f908c9..532f6cae70 100755 --- a/t/db_dependent/Context.t +++ b/t/db_dependent/Context.t @@ -53,8 +53,7 @@ $dbh->rollback; ok($koha = C4::Context->new, 'C4::Context->new'); my @keys = keys %$koha; my $width = 0; -ok( @keys, 'Expecting entries in context hash' ); -if( @keys ) { +if (ok(@keys)) { $width = (sort {$a <=> $b} map {length} @keys)[-1]; $debug and diag "widest key is $width"; } @@ -67,6 +66,7 @@ foreach (sort @keys) { ok($config = $koha->{config}, 'Getting $koha->{config} '); # Testing syspref caching +use Test::DBIx::Class; my $schema = Koha::Database->new()->schema(); $schema->storage->debug(1);