Bugzilla – Attachment 156129 Details for
Bug 34887
Merge Patron.t into t/db/Koha/Patron.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34887: Fix transactions in db dependent Patron.t
Bug-34887-Fix-transactions-in-db-dependent-Patront.patch (text/plain), 2.44 KB, created by
Marcel de Rooy
on 2023-09-23 07:14:09 UTC
(
hide
)
Description:
Bug 34887: Fix transactions in db dependent Patron.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-23 07:14:09 UTC
Size:
2.44 KB
patch
obsolete
>From b622595530c29cc1dcb7b41f1f989e6ec103e973 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 22 Sep 2023 14:14:02 +0000 >Subject: [PATCH] Bug 34887: Fix transactions in db dependent Patron.t >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/Patron.t | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index b2c82dfb9c..32519eb689 100755 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -1172,6 +1172,8 @@ subtest 'safe_to_delete() tests' => sub { > ok( $patron->safe_to_delete, 'Can delete, all conditions met' ); > my $messages = $patron->safe_to_delete->messages; > is_deeply( $messages, [], 'Patron can be deleted, no messages' ); >+ >+ $schema->storage->txn_rollback; > }; > > subtest 'article_request_fee() tests' => sub { >@@ -1446,6 +1448,7 @@ subtest 'notify_library_of_registration()' => sub { > > subtest 'notice_email_address' => sub { > plan tests => 2; >+ $schema->storage->txn_begin; > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > >@@ -1457,10 +1460,12 @@ subtest 'notice_email_address' => sub { > is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is emailpro"); > > $patron->delete; >+ $schema->storage->txn_rollback; > }; > > subtest 'first_valid_email_address' => sub { > plan tests => 1; >+ $schema->storage->txn_begin; > > my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { emailpro => ''}}); > >@@ -1468,6 +1473,7 @@ subtest 'first_valid_email_address' => sub { > is ($patron->first_valid_email_address, $patron->email, "Koha::Patron->first_valid_email_address returns correct value when EmailFieldPrecedence is 'emailpro|email' and emailpro is empty"); > > $patron->delete; >+ $schema->storage->txn_rollback; > }; > > subtest 'get_savings tests' => sub { >@@ -1519,6 +1525,7 @@ subtest 'get_savings tests' => sub { > }; > > subtest 'update privacy tests' => sub { >+ $schema->storage->txn_begin; > > plan tests => 5; > >@@ -1548,4 +1555,6 @@ subtest 'update privacy tests' => sub { > > is( $old_checkout->borrowernumber, $anon_patron->id, "Checkout is successfully anonymized"); > is( $patron->privacy(), 2, "Patron privacy is successfully updated"); >+ >+ $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 34887
:
156128
|
156129
|
156130
|
156207
|
156208
|
156209