View | Details | Raw Unified | Return to bug 18010
Collapse All | Expand All

(-)a/t/db_dependent/Templates.t (-2 / +9 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use CGI;
20
use CGI;
21
21
22
use Test::More tests => 5;
22
use Test::More tests => 6;
23
use Test::Deep;
23
use Test::Deep;
24
use Test::Warn;
24
25
25
BEGIN {
26
BEGIN {
26
    use_ok( 'C4::Templates' );
27
    use_ok( 'C4::Templates' );
Lines 45-49 is( scalar @keys, 6, "GetColumnDefs correctly returns the 5 tables defined in co Link Here
45
my @tables = ( 'biblio', 'biblioitems', 'borrowers', 'items', 'statistics', 'subscription');
46
my @tables = ( 'biblio', 'biblioitems', 'borrowers', 'items', 'statistics', 'subscription');
46
cmp_deeply( \@keys, \@tables, "GetColumnDefs returns the expected tables");
47
cmp_deeply( \@keys, \@tables, "GetColumnDefs returns the expected tables");
47
48
49
subtest 'Testing gettemplate' => sub {
50
    plan tests => 2;
51
52
    my $template;
53
    warning_like { eval { $template = C4::Templates::gettemplate( '/etc/passwd', 'opac', CGI->new, 1 ) }; warn $@ if $@; } qr/bad template/, 'Bad template check';
54
    is( $template ? $template->output: '', '', 'Check output' );
55
};
48
56
49
1;
57
1;
50
- 

Return to bug 18010