Bugzilla – Attachment 176887 Details for
Bug 38744
Tests in Koha/Biblio.t are not rolling back
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38744: Wrap tests in Biblio.t inside a transaction
Bug-38744-Wrap-tests-in-Bibliot-inside-a-transacti.patch (text/plain), 3.17 KB, created by
David Nind
on 2025-01-22 09:12:54 UTC
(
hide
)
Description:
Bug 38744: Wrap tests in Biblio.t inside a transaction
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-01-22 09:12:54 UTC
Size:
3.17 KB
patch
obsolete
>From cbaa4bc8dc374ec40cf902222c192ccc4789489c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 18 Dec 2024 11:33:56 -0300 >Subject: [PATCH] Bug 38744: Wrap tests in Biblio.t inside a transaction > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Koha/Biblio.t | 25 ++++++++++++++++++++++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 0576acca56..90e8ed68c7 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -1697,9 +1697,12 @@ subtest 'item_groups() tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'normalized_isbn' => sub { >+subtest 'normalized_isbn() tests' => sub { >+ > plan tests => 1; > >+ $schema->storage->txn_begin; >+ > # We will move the tests from GetNormalizedISBN here when it will get replaced > my $biblio = $builder->build_sample_biblio(); > $biblio->biblioitem->set( { isbn => '9781250067128 | 125006712X' } )->store; >@@ -1707,11 +1710,16 @@ subtest 'normalized_isbn' => sub { > $biblio->normalized_isbn, C4::Koha::GetNormalizedISBN( $biblio->biblioitem->isbn ), > 'normalized_isbn is a wrapper around C4::Koha::GetNormalizedISBN' > ); >+ >+ $schema->storage->txn_rollback; > }; > >-subtest 'normalized_upc' => sub { >+subtest 'normalized_upc() tests' => sub { >+ > plan tests => 1; > >+ $schema->storage->txn_begin; >+ > # We will move the tests from GetNormalizedUPC here when it will get replaced > # Note that only a single test exist and it's not really meaningful... > my $biblio = $builder->build_sample_biblio(); >@@ -1719,11 +1727,16 @@ subtest 'normalized_upc' => sub { > $biblio->normalized_upc, C4::Koha::GetNormalizedUPC( $biblio->metadata->record ), > 'normalized_upc is a wrapper around C4::Koha::GetNormalizedUPC' > ); >+ >+ $schema->storage->txn_rollback; > }; > >-subtest 'normalized_oclc' => sub { >+subtest 'normalized_oclc() tests' => sub { >+ > plan tests => 1; > >+ $schema->storage->txn_begin; >+ > # We will move the tests from GetNormalizedOCLC here when it will get replaced > # Note that only a single test exist and it's not really meaningful... > my $biblio = $builder->build_sample_biblio(); >@@ -1731,6 +1744,8 @@ subtest 'normalized_oclc' => sub { > $biblio->normalized_oclc, C4::Koha::GetNormalizedOCLCNumber( $biblio->metadata->record ), > 'normalized_oclc is a wrapper around C4::Koha::GetNormalizedOCLCNumber' > ); >+ >+ $schema->storage->txn_rollback; > }; > > subtest 'ratings' => sub { >@@ -1743,6 +1758,8 @@ subtest 'opac_summary_html' => sub { > > plan tests => 2; > >+ $schema->storage->txn_begin; >+ > my $author = 'my author'; > my $title = 'my title'; > my $isbn = '9781250067128 | 125006712X'; >@@ -1761,6 +1778,8 @@ subtest 'opac_summary_html' => sub { > sprintf( 'Replace %s, %s, %s AND %s please', $author, $title, $biblio->normalized_isbn, $biblio->biblionumber ), > 'opac_summary_html replaces the different patterns' > ); >+ >+ $schema->storage->txn_rollback; > }; > > subtest 'can_be_edited() tests' => sub { >-- >2.39.5
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 38744
:
175653
|
176883
|
176887
|
176894
|
176895