1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
use strict;
use warnings;
use Test::More;
use Catmandu::Fix;
my $pkg;
BEGIN {
plan skip_all => "Unset NO_NETWORK to enable this test" if $ENV{NO_NETWORK};
$pkg = 'Catmandu::Fix::aat_search';
use_ok $pkg;
}
my $record = {
'objectName' => 'schilderingen'
};
my $record_lang = {
'objectName' => 'matte paintings'
};
my $fixer = Catmandu::Fix->new(fixes => ['aat_search(objectName)']);
my $fixer_lang = Catmandu::Fix->new(fixes => ['aat_search(objectName, -lang:en)']);
$fixer->fix($record);
$fixer_lang->fix($record_lang);
isa_ok($record->{'objectName'}, 'ARRAY');
isa_ok($record_lang->{'objectName'}, 'ARRAY');
done_testing 3;
|