|
Lines 21-27
use Modern::Perl;
Link Here
|
| 21 |
use Test::Deep qw( cmp_deeply re ); |
21 |
use Test::Deep qw( cmp_deeply re ); |
| 22 |
use Test::MockTime qw/set_fixed_time set_relative_time restore_time/; |
22 |
use Test::MockTime qw/set_fixed_time set_relative_time restore_time/; |
| 23 |
|
23 |
|
| 24 |
use Test::More tests => 33; |
24 |
use Test::More tests => 34; |
| 25 |
use DateTime; |
25 |
use DateTime; |
| 26 |
use File::Basename; |
26 |
use File::Basename; |
| 27 |
use File::Spec; |
27 |
use File::Spec; |
|
Lines 865-867
subtest 'Tests for timestamp handling' => sub {
Link Here
|
| 865 |
|
865 |
|
| 866 |
$schema->storage->txn_rollback; |
866 |
$schema->storage->txn_rollback; |
| 867 |
}; |
867 |
}; |
| 868 |
- |
868 |
|
|
|
869 |
subtest 'ListSets() tests' => sub { |
| 870 |
|
| 871 |
plan tests => 2; |
| 872 |
|
| 873 |
$schema->storage->txn_begin; |
| 874 |
|
| 875 |
# initial cleanup |
| 876 |
$schema->resultset('OaiSet')->delete; |
| 877 |
|
| 878 |
test_query( |
| 879 |
'ListSets - no sets should return a noSetHierarchy exception', |
| 880 |
{ verb => 'ListSets' }, |
| 881 |
{ |
| 882 |
error => { |
| 883 |
code => 'noSetHierarchy', |
| 884 |
content => 'There are no OAI sets defined', |
| 885 |
} |
| 886 |
} |
| 887 |
); |
| 888 |
|
| 889 |
# Add a couple sets |
| 890 |
AddOAISet({ spec => 'set_1', name => 'Set 1' }); |
| 891 |
AddOAISet({ spec => 'set_2', name => 'Set 2' }); |
| 892 |
|
| 893 |
test_query( |
| 894 |
'ListSets - no sets should return a noSetHierarchy exception', |
| 895 |
{ verb => 'ListSets' }, |
| 896 |
{ |
| 897 |
ListSets => { |
| 898 |
set => [ |
| 899 |
{ setSpec => 'set_1', setName => 'Set 1' }, |
| 900 |
{ setSpec => 'set_2', setName => 'Set 2' }, |
| 901 |
] |
| 902 |
} |
| 903 |
} |
| 904 |
); |
| 905 |
|
| 906 |
$schema->storage->txn_rollback; |
| 907 |
}; |