Lines 19-32
our $schema = Koha::Database->new->schema;
Link Here
|
19 |
|
19 |
|
20 |
# Here we go |
20 |
# Here we go |
21 |
$schema->storage->txn_begin; |
21 |
$schema->storage->txn_begin; |
22 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
22 |
subtest 'CustomXSLTExportList: Caching' => sub { |
23 |
plan tests => 2; |
23 |
plan tests => 1; |
24 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'custom'); |
24 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'custom'); |
25 |
my $list = C4::XSLT::CustomXSLTExportList(1); |
25 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
26 |
is( @$list>0, 1, 'We expect at least one result: simple export' ); |
26 |
my $list = C4::XSLT::CustomXSLTExportList(1); |
27 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'dc'); |
27 |
push @$list, { nonsense => 1 }; |
|
|
28 |
$cache->set_in_cache( 'CustomXSLTExportListOPAC', $list ); |
29 |
my $n = @$list; |
28 |
$list = C4::XSLT::CustomXSLTExportList(1); |
30 |
$list = C4::XSLT::CustomXSLTExportList(1); |
29 |
is( @$list, 0, 'We expect an empty list now' ); |
31 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
|
|
32 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
30 |
}; |
33 |
}; |
31 |
|
34 |
|
32 |
subtest 'transformMARCXML4XSLT tests' => sub { |
35 |
subtest 'transformMARCXML4XSLT tests' => sub { |
33 |
- |
|
|