Bug 37146: Add tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
3a2a76726f
commit
62f80f1efe
|
|
@ -3,8 +3,9 @@ use Modern::Perl;
|
|||
use CGI;
|
||||
use File::Temp qw/tempfile/;
|
||||
use Getopt::Long;
|
||||
use Test::More tests => 7;
|
||||
use Test::MockModule;
|
||||
use Test::More tests => 6;
|
||||
use Test::Warn;
|
||||
|
||||
use t::lib::Mocks;
|
||||
use t::lib::TestBuilder;
|
||||
|
|
@ -61,6 +62,19 @@ subtest 'Test06 -- test biblio_008' => sub {
|
|||
is( substr($field, 15, 3), '|||', 'Check country fallback for undefined' );
|
||||
};
|
||||
|
||||
subtest 'Test07 -- validate input' => sub {
|
||||
plan tests => 4;
|
||||
|
||||
my $plugin = Koha::FrameworkPlugin->new( { name => '../../misc/maintenance/touch_all_biblios.pl' } );
|
||||
warning_like { $plugin->launch } qr{Attempt to load};
|
||||
like( $plugin->errstr, qr{File not found} );
|
||||
|
||||
$plugin = Koha::FrameworkPlugin->new( { name => 'non-existent-plugin.pl' } );
|
||||
warning_like { $plugin->launch } q{};
|
||||
like( $plugin->errstr, qr{File not found} );
|
||||
|
||||
};
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
|
||||
sub test01 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue