@@ -, +, @@ --- t/Koha/Exceptions.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) --- a/t/Koha/Exceptions.t +++ a/t/Koha/Exceptions.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 11; +use Test::More tests => 12; use Test::MockObject; use Test::Exception; @@ -337,6 +337,21 @@ subtest 'Koha::Exceptions::Plugin tests' => sub { is( "$@", "Calling 'upgrade' died for plugin $plugin_class", 'Exception stringified correctly' ); }; +subtest 'Koha::Exceptions::Booking tests' => sub { + + plan tests => 2; + + use_ok('Koha::Exceptions::Booking'); + + throws_ok + { Koha::Exceptions::Booking::Clash->throw() } + 'Koha::Exceptions::Booking::Clash', + 'Exception is thrown :-D'; + + # stringify the exception + is( "$@", 'Adding or updating the booking would result in a clash', 'Exception stringigied correctly' ); +}; + subtest 'Koha::Exception tests' => sub { plan tests => 8; --