From ede59c55ad69019fc64f62d4a0125e8a7727bf9f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 2 Feb 2026 14:29:55 +0100 Subject: [PATCH] Bug 41696: Add a test --- t/db_dependent/Koha/ApiKey.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/ApiKey.t b/t/db_dependent/Koha/ApiKey.t index f953d7a49fb..be20fb1bcba 100755 --- a/t/db_dependent/Koha/ApiKey.t +++ b/t/db_dependent/Koha/ApiKey.t @@ -35,7 +35,7 @@ my $builder = t::lib::TestBuilder->new; subtest 'store() tests' => sub { - plan tests => 17; + plan tests => 18; $schema->storage->txn_begin; @@ -114,6 +114,8 @@ subtest 'store() tests' => sub { }, qr{a foreign key constraint fails} ); + + is( "$@", "Invalid parameter passed, patron_id=$deleted_id does not exist" ); is( $@->message, 'Broken FK constraint', 'Exception message is correct' ); is( $@->broken_fk, 'patron_id', 'Exception field is correct' ); -- 2.43.0