Lines 18-24
Link Here
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use MARC::Record; |
20 |
use MARC::Record; |
21 |
use Test::More tests => 4; |
21 |
use Test::More tests => 7; |
22 |
use Test::Warn; |
22 |
use Test::Warn; |
23 |
use t::lib::TestBuilder; |
23 |
use t::lib::TestBuilder; |
24 |
use t::lib::Mocks; |
24 |
use t::lib::Mocks; |
Lines 47-54
subtest 'CustomXSLTExportList: Caching' => sub {
Link Here
|
47 |
push @$list, { nonsense => 1 }; |
47 |
push @$list, { nonsense => 1 }; |
48 |
$cache->set_in_cache( 'CustomXSLTExportListOPAC', $list ); |
48 |
$cache->set_in_cache( 'CustomXSLTExportListOPAC', $list ); |
49 |
my $n = @$list; |
49 |
my $n = @$list; |
50 |
$list = C4::XSLT::CustomXSLTExportList(1); |
|
|
51 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
50 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
|
|
51 |
$list = C4::XSLT::CustomXSLTExportList(1); |
52 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
52 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
53 |
}; |
53 |
}; |
54 |
|
54 |
|
Lines 166-173
subtest 'CustomXSLTExportList: Caching' => sub {
Link Here
|
166 |
push @$list, { nonsense => 1 }; |
166 |
push @$list, { nonsense => 1 }; |
167 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
167 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
168 |
my $n = @$list; |
168 |
my $n = @$list; |
169 |
$list = C4::XSLT::CustomXSLTExportList(1); |
|
|
170 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
169 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
|
|
170 |
$list = C4::XSLT::CustomXSLTExportList(1); |
171 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
171 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
172 |
}; |
172 |
}; |
173 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
173 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
174 |
- |
|
|