|
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 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 178-185
subtest 'CustomXSLTExportList: Caching' => sub {
Link Here
|
| 178 |
push @$list, { nonsense => 1 }; |
178 |
push @$list, { nonsense => 1 }; |
| 179 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
179 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
| 180 |
my $n = @$list; |
180 |
my $n = @$list; |
| 181 |
$list = C4::XSLT::CustomXSLTExportList(1); |
|
|
| 182 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
181 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
|
|
182 |
$list = C4::XSLT::CustomXSLTExportList(1); |
| 183 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
183 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
| 184 |
}; |
184 |
}; |
| 185 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
185 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
| 186 |
- |
|
|