Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 11; |
20 |
use Test::More tests => 12; |
21 |
use Test::MockObject; |
21 |
use Test::MockObject; |
22 |
use Test::Exception; |
22 |
use Test::Exception; |
23 |
|
23 |
|
Lines 337-342
subtest 'Koha::Exceptions::Plugin tests' => sub {
Link Here
|
337 |
is( "$@", "Calling 'upgrade' died for plugin $plugin_class", 'Exception stringified correctly' ); |
337 |
is( "$@", "Calling 'upgrade' died for plugin $plugin_class", 'Exception stringified correctly' ); |
338 |
}; |
338 |
}; |
339 |
|
339 |
|
|
|
340 |
subtest 'Koha::Exceptions::Booking tests' => sub { |
341 |
|
342 |
plan tests => 2; |
343 |
|
344 |
use_ok('Koha::Exceptions::Booking'); |
345 |
|
346 |
throws_ok |
347 |
{ Koha::Exceptions::Booking::Clash->throw() } |
348 |
'Koha::Exceptions::Booking::Clash', |
349 |
'Exception is thrown :-D'; |
350 |
|
351 |
# stringify the exception |
352 |
is( "$@", 'Adding or updating the booking would result in a clash', 'Exception stringigied correctly' ); |
353 |
}; |
354 |
|
340 |
subtest 'Koha::Exception tests' => sub { |
355 |
subtest 'Koha::Exception tests' => sub { |
341 |
|
356 |
|
342 |
plan tests => 8; |
357 |
plan tests => 8; |
343 |
- |
|
|