|
Line 0
Link Here
|
| 0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
use Test::More tests => 1; |
| 3 |
|
| 4 |
use t::lib::Mocks; |
| 5 |
use C4::XSLT; |
| 6 |
use Koha::Database; |
| 7 |
|
| 8 |
our $schema = Koha::Database->new->schema; |
| 9 |
|
| 10 |
# Here we go |
| 11 |
$schema->storage->txn_begin; |
| 12 |
subtest 'CustomXSLTExportList: Check export options' => sub { |
| 13 |
plan tests => 2; |
| 14 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'custom'); |
| 15 |
|
| 16 |
my $list = C4::XSLT::CustomXSLTExportList(1); |
| 17 |
is( @$list>0, 1, 'We expect at least one result: simple export' ); |
| 18 |
|
| 19 |
t::lib::Mocks::mock_preference('OpacExportOptions', 'dc'); |
| 20 |
$list = C4::XSLT::CustomXSLTExportList(1); |
| 21 |
is( @$list, 0, 'We expect an empty list now' ); |
| 22 |
}; |
| 23 |
$schema->storage->txn_rollback; |