Bug 43330: Simplify tests

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Jonathan Druart 2026-09-08 14:39:10 +02:00 committed by Pedro Amorim
parent d5f522e526
commit fe8a9a5529
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 4 additions and 18 deletions

View File

@ -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'
);