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

(-)a/t/db_dependent/Templates.t (-2 / +7 lines)
Lines 101-107 subtest 'Testing themelanguage' => sub { Link Here
101
};
101
};
102
102
103
subtest 'Testing gettemplate/badtemplatecheck' => sub {
103
subtest 'Testing gettemplate/badtemplatecheck' => sub {
104
    plan tests => 7;
104
    plan tests => 8;
105
105
106
    my $cgi = CGI->new;
106
    my $cgi = CGI->new;
107
    my $template;
107
    my $template;
Lines 118-123 subtest 'Testing gettemplate/badtemplatecheck' => sub { Link Here
118
    warning_like { eval { C4::Templates::badtemplatecheck( '/tmp/about.tt' ) }; warn $@ if $@; } undef, 'No warn on template from plugin dir';
118
    warning_like { eval { C4::Templates::badtemplatecheck( '/tmp/about.tt' ) }; warn $@ if $@; } undef, 'No warn on template from plugin dir';
119
    # Refuse wrong extension
119
    # Refuse wrong extension
120
    warning_like { eval { C4::Templates::badtemplatecheck( '/tmp/about.tmpl' ) }; warn $@ if $@; } qr/bad template/, 'Warn on bad extension';
120
    warning_like { eval { C4::Templates::badtemplatecheck( '/tmp/about.tmpl' ) }; warn $@ if $@; } qr/bad template/, 'Warn on bad extension';
121
122
    # Make sure badtemplatecheck works on a copy of pluginsdir and doesn't modify its values
123
    t::lib::Mocks::mock_config( 'pluginsdir', [ '/tmp', '/tmp2' ] );
124
    C4::Templates::badtemplatecheck('/tmp/test.tt');
125
    cmp_deeply( C4::Context->config('pluginsdir'), ['/tmp', '/tmp2'], "Doesn't modify configuration values" );
126
121
};
127
};
122
128
123
subtest "Absolute path change in _get_template_file" => sub {
129
subtest "Absolute path change in _get_template_file" => sub {
124
- 

Return to bug 28303