Bugzilla – Attachment 141287 Details for
Bug 26648
Prevent internal server error if item attached to old checkout has been removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26648: Add tests
Bug-26648-Add-tests.patch (text/plain), 1.33 KB, created by
Lucas Gass (lukeg)
on 2022-10-03 18:28:06 UTC
(
hide
)
Description:
Bug 26648: Add tests
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-10-03 18:28:06 UTC
Size:
1.33 KB
patch
obsolete
>From f3ad14d8133bf1376b49dd64d30e5347de480033 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 3 Oct 2022 18:27:21 +0000 >Subject: [PATCH] Bug 26648: Add tests > >--- > t/db_dependent/Koha/Old/Checkout.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Old/Checkout.t b/t/db_dependent/Koha/Old/Checkout.t >index a5c8f0c38d..7cf520e96f 100755 >--- a/t/db_dependent/Koha/Old/Checkout.t >+++ b/t/db_dependent/Koha/Old/Checkout.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 1; >+use Test::More tests => 2; > use Test::Exception; > > use Koha::Database; >@@ -80,3 +80,27 @@ subtest 'anonymize() tests' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'deleteitem() tests' => sub { >+ >+ plan tests => 1; >+ >+ $schema->storage->txn_begin; >+ >+ my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >+ >+ my $checkout_3 = $builder->build_object( >+ { >+ class => 'Koha::Old::Checkouts', >+ value => { borrowernumber => $patron->id } >+ } >+ ); >+ >+ # delete first checkout >+ my $item_to_del = $checkout_3->item; >+ $item_to_del->delete; >+ $checkout_3->discard_changes(); >+ is( $checkout_3->item, undef, "Item is deleted"); >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.30.2
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 26648
:
111416
|
111435
|
111804
|
141287
|
141333
|
141334
|
141382