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 <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8da67cec72)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2024-08-19 08:55:11 -03:00 committed by Lucas Gass
parent 85afecd491
commit a4706d6c77
1 changed files with 1 additions and 2 deletions

View File

@ -769,8 +769,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');
};