Bugzilla – Attachment 170464 Details for
Bug 37510
Koha::Object->delete should throw a Koha::Exception if there's a parent row constraint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37510: Fix Objects.t and remove FIXME
Bug-37510-Fix-Objectst-and-remove-FIXME.patch (text/plain), 1.40 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-08-19 11:56:53 UTC
(
hide
)
Description:
Bug 37510: Fix Objects.t and remove FIXME
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-08-19 11:56:53 UTC
Size:
1.40 KB
patch
obsolete
>From e410f78ad960bfee0ca644e206348cf83c5a0a20 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >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 <tomascohen@theke.io> >--- > 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 9f4a6f03230..e98ddf8f3ad 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.46.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37510
:
169829
|
169830
|
169842
|
169843
|
169848
|
169849
|
169938
|
169939
| 170464