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 => 3; |
21 |
use Test::More tests => 6; |
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 46-53
subtest 'CustomXSLTExportList: Caching' => sub {
Link Here
|
46 |
push @$list, { nonsense => 1 }; |
46 |
push @$list, { nonsense => 1 }; |
47 |
$cache->set_in_cache( 'CustomXSLTExportListOPAC', $list ); |
47 |
$cache->set_in_cache( 'CustomXSLTExportListOPAC', $list ); |
48 |
my $n = @$list; |
48 |
my $n = @$list; |
49 |
$list = C4::XSLT::CustomXSLTExportList(1); |
|
|
50 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
49 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
|
|
50 |
$list = C4::XSLT::CustomXSLTExportList(1); |
51 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
51 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
52 |
}; |
52 |
}; |
53 |
|
53 |
|
Lines 167-174
subtest 'CustomXSLTExportList: Caching' => sub {
Link Here
|
167 |
push @$list, { nonsense => 1 }; |
167 |
push @$list, { nonsense => 1 }; |
168 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
168 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
169 |
my $n = @$list; |
169 |
my $n = @$list; |
170 |
$list = C4::XSLT::CustomXSLTExportList(1); |
|
|
171 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
170 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
|
|
171 |
$list = C4::XSLT::CustomXSLTExportList(1); |
172 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
172 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
173 |
}; |
173 |
}; |
174 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
174 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
175 |
- |
|
|