Bug 27636: Be explicit on the exception we expect

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-04-28 11:32:09 +02:00
parent 7c88df8289
commit e2ba01d982
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ subtest "Koha::Account::pay tests" => sub {
# We attempt to make a -$30 payment (a NEGATIVE payment)
$data = '-30.00';
$payment_note = '-$30.00 payment note';
throws_ok { $account->pay( { amount => $data, note => $payment_note } ) } qr//, 'Croaked on call to pay with negative amount';
throws_ok { $account->pay( { amount => $data, note => $payment_note } ) } 'Koha::Exceptions::Account::AmountNotPositive', 'Croaked on call to pay with negative amount';
#We make a $150 payment ( > 1stLine )
$data = '150.00';