Lines 102-105
subtest 'buildKohaItemsNamespace status tests' => sub {
Link Here
|
102 |
$xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); |
102 |
$xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); |
103 |
like($xml,qr{<status>Pending hold</status>},"Pending status takes precedence over all"); |
103 |
like($xml,qr{<status>Pending hold</status>},"Pending status takes precedence over all"); |
104 |
}; |
104 |
}; |
|
|
105 |
subtest 'CustomXSLTExportList: Caching' => sub { |
106 |
plan tests => 1; |
107 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'custom'); |
108 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
109 |
my $list = C4::XSLT::CustomXSLTExportList(1); |
110 |
push @$list, { nonsense => 1 }; |
111 |
$cache->set_in_cache('CustomXSLTExportListOPAC', $list ); |
112 |
my $n = @$list; |
113 |
$list = C4::XSLT::CustomXSLTExportList(1); |
114 |
is( @$list, $n, 'This list comes from the cache and that is fine' ); |
115 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
116 |
}; |
117 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
118 |
plan tests => 2; |
119 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'custom'); |
120 |
my $list = C4::XSLT::CustomXSLTExportList(1); |
121 |
is( $list>0, 1, 'We expect at least one result: simple export' ); |
122 |
$cache->clear_from_cache('CustomXSLTExportListOPAC'); |
123 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'dc'); |
124 |
$list = C4::XSLT::CustomXSLTExportList(1); |
125 |
is( @$list, 0, 'We expect an empty list now' ); |
126 |
}; |
105 |
$schema->storage->txn_rollback; |
127 |
$schema->storage->txn_rollback; |
106 |
- |
|
|