Bugzilla – Attachment 82950 Details for
Bug 21911
Scoping OPACs by branch does not work with new library groups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21911: Regression test
Bug-21911-Regression-test.patch (text/plain), 2.35 KB, created by
Marcel de Rooy
on 2018-12-07 07:14:20 UTC
(
hide
)
Description:
Bug 21911: Regression test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-12-07 07:14:20 UTC
Size:
2.35 KB
patch
obsolete
>From 87cda65f872da2159af000f57dee98a61d1334f0 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Fri, 30 Nov 2018 07:09:23 +0000 >Subject: [PATCH] Bug 21911: Regression test >Content-Type: text/plain; charset=utf-8 > >This tests usuall cases, but note, that administrator could make a >branch with code "%%%" or so, which this test does not cover, and some >functionalities will not work in that case: opac limit override, > holdinbranch facet > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Auth.t | 30 +++++++++++++++++++++++++++++- > 1 file changed, 29 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t >index 1610b80..82193f3 100644 >--- a/t/db_dependent/Auth.t >+++ b/t/db_dependent/Auth.t >@@ -10,7 +10,7 @@ use CGI qw ( -utf8 ); > use Test::MockObject; > use Test::MockModule; > use List::MoreUtils qw/all any none/; >-use Test::More tests => 22; >+use Test::More tests => 26; > use Test::Warn; > use t::lib::Mocks; > use t::lib::TestBuilder; >@@ -253,6 +253,34 @@ my $hash2 = hash_password('password'); > ); > my $file_exists = ( -f $template->{filename} ) ? 1 : 0; > is ( $file_exists, 1, 'The file errors/errorpage.tt should be accessible (contains integers)' ); >+ >+ # Regression test for env opac search limit override >+ $ENV{"OPAC_SEARCH_LIMIT"} = "branch:CPL"; >+ $ENV{"OPAC_LIMIT_OVERRIDE"} = 1; >+ >+ ( $template, $loggedinuser, $cookies) = get_template_and_user( >+ { >+ template_name => 'opac-main.tt', >+ query => $query, >+ type => 'opac', >+ authnotrequired => 1, >+ } >+ ); >+ is($template->{VARS}->{'opac_name'}, "CPL", "Opac name was set correctly"); >+ is($template->{VARS}->{'opac_search_limit'}, "branch:CPL", "Search limit was set correctly"); >+ >+ $ENV{"OPAC_SEARCH_LIMIT"} = "branch:multibranch-19"; >+ >+ ( $template, $loggedinuser, $cookies) = get_template_and_user( >+ { >+ template_name => 'opac-main.tt', >+ query => $query, >+ type => 'opac', >+ authnotrequired => 1, >+ } >+ ); >+ is($template->{VARS}->{'opac_name'}, "multibranch-19", "Opac name was set correctly"); >+ is($template->{VARS}->{'opac_search_limit'}, "branch:multibranch-19", "Search limit was set correctly"); > } > > # Check that there is always an OPACBaseURL set. >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21911
:
82743
|
82754
|
82767
|
82949
| 82950