Bug 10078: (follow-up) add regression test
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
c767545119
commit
a0b042b8a2
|
|
@ -8,7 +8,7 @@ use warnings;
|
|||
use C4::Context;
|
||||
use Koha::DateUtils qw(dt_from_string);
|
||||
|
||||
use Test::More tests => 6;
|
||||
use Test::More tests => 7;
|
||||
use DateTime::Format::MySQL;
|
||||
|
||||
BEGIN {
|
||||
|
|
@ -242,3 +242,22 @@ subtest 'Date and ISBN tests' => sub {
|
|||
'0321496949', '_isbn_cleanup converts ISBN-13 to ISBN-10' );
|
||||
|
||||
};
|
||||
|
||||
subtest 'getFacets() tests' => sub {
|
||||
plan tests => 2;
|
||||
|
||||
C4::Context->set_preference('singleBranchMode', 0);
|
||||
my $facets = C4::Koha::getFacets();
|
||||
is(
|
||||
scalar( grep { defined $_->{idx} && $_->{idx} eq 'location' } @$facets ),
|
||||
1,
|
||||
'location facet present with singleBranchMode off (bug 10078)'
|
||||
);
|
||||
C4::Context->set_preference('singleBranchMode', 1);
|
||||
$facets = C4::Koha::getFacets();
|
||||
is(
|
||||
scalar( grep { defined $_->{idx} && $_->{idx} eq 'location' } @$facets ),
|
||||
1,
|
||||
'location facet present with singleBranchMode on (bug 10078)'
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue