From 8da67cec7217c4519fb0a73d33c65e967ecef529 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 19 Aug 2024 08:55:11 -0300 Subject: [PATCH] Bug 37510: Fix Objects.t and remove FIXME This patch makes the tests check for the added exception instead of the generic DBIx::Class::Exception. A FIXME was set in place proposing we should throw a Koha::Exception instead, so removing the FIXME as that's what this patch actually did. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- t/db_dependent/Koha/Objects.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t index 9f4a6f0323..e98ddf8f3a 100755 --- a/t/db_dependent/Koha/Objects.t +++ b/t/db_dependent/Koha/Objects.t @@ -770,8 +770,7 @@ subtest 'Return same values as DBIx::Class' => sub { defined $e_us && defined $e_them, 'Delete patrons with one that cannot be deleted should raise an exception' ); - is( ref($e_us), 'DBIx::Class::Exception' ) - ; # FIXME This needs adjustement, we want to throw a Koha::Exception + is( ref($e_us), 'Koha::Exceptions::Object::FKConstraintDeletion' ); ok($not_deleted_us == 3 && $not_deleted_them == 3, 'If one patron cannot be deleted, none should have been deleted'); }; -- 2.39.5