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

(-)a/t/db_dependent/Auth.t (-2 / +29 lines)
Lines 10-16 use CGI qw ( -utf8 ); Link Here
10
use Test::MockObject;
10
use Test::MockObject;
11
use Test::MockModule;
11
use Test::MockModule;
12
use List::MoreUtils qw/all any none/;
12
use List::MoreUtils qw/all any none/;
13
use Test::More tests => 22;
13
use Test::More tests => 26;
14
use Test::Warn;
14
use Test::Warn;
15
use t::lib::Mocks;
15
use t::lib::Mocks;
16
use t::lib::TestBuilder;
16
use t::lib::TestBuilder;
Lines 253-258 my $hash2 = hash_password('password'); Link Here
253
    );
253
    );
254
    my $file_exists = ( -f $template->{filename} ) ? 1 : 0;
254
    my $file_exists = ( -f $template->{filename} ) ? 1 : 0;
255
    is ( $file_exists, 1, 'The file errors/errorpage.tt should be accessible (contains integers)' );
255
    is ( $file_exists, 1, 'The file errors/errorpage.tt should be accessible (contains integers)' );
256
257
    # Regression test for env opac search limit override
258
    $ENV{"OPAC_SEARCH_LIMIT"} = "branch:CPL";
259
    $ENV{"OPAC_LIMIT_OVERRIDE"} = 1;
260
261
    ( $template, $loggedinuser, $cookies) = get_template_and_user(
262
        {
263
            template_name => 'opac-main.tt',
264
            query => $query,
265
            type => 'opac',
266
            authnotrequired => 1,
267
        }
268
    );
269
    is($template->{VARS}->{'opac_name'}, "CPL", "Opac name was set correctly");
270
    is($template->{VARS}->{'opac_search_limit'}, "branch:CPL", "Search limit was set correctly");
271
272
    $ENV{"OPAC_SEARCH_LIMIT"} = "branch:multibranch-19";
273
274
    ( $template, $loggedinuser, $cookies) = get_template_and_user(
275
        {
276
            template_name => 'opac-main.tt',
277
            query => $query,
278
            type => 'opac',
279
            authnotrequired => 1,
280
        }
281
    );
282
    is($template->{VARS}->{'opac_name'}, "multibranch-19", "Opac name was set correctly");
283
    is($template->{VARS}->{'opac_search_limit'}, "branch:multibranch-19", "Search limit was set correctly");
256
}
284
}
257
285
258
# Check that there is always an OPACBaseURL set.
286
# Check that there is always an OPACBaseURL set.
259
- 

Return to bug 21911