Bug 43330: Simplify tests
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d5f522e526
commit
fe8a9a5529
|
|
@ -3,7 +3,8 @@
|
|||
use Modern::Perl;
|
||||
|
||||
use Test::NoWarnings;
|
||||
use Test::More tests => 3;
|
||||
use Test::More tests => 2;
|
||||
use Test::Exception;
|
||||
|
||||
use C4::Context;
|
||||
|
||||
|
|
@ -11,22 +12,7 @@ my $original = C4::Context->preference('TagsExternalDictionary');
|
|||
|
||||
C4::Context->set_preference( 'TagsExternalDictionary', '/usr/bin/ispell' );
|
||||
|
||||
my $output = qx{
|
||||
perl -I. -MC4::Tags -e 'print "loaded\n"' 2>&1
|
||||
};
|
||||
my $exit_status = $? >> 8;
|
||||
lives_ok { require C4::Tags } 'C4::Tags compiles when TagsExternalDictionary is configured';
|
||||
|
||||
# Restore the original preference before checking the result
|
||||
# Restore the original preference
|
||||
C4::Context->set_preference( 'TagsExternalDictionary', $original // q{} );
|
||||
|
||||
is(
|
||||
$exit_status,
|
||||
0,
|
||||
'C4::Tags loads when TagsExternalDictionary is configured'
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/loaded/,
|
||||
'C4::Tags finished loading successfully'
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue