Bugzilla – Attachment 129358 Details for
Bug 29838
No string interpolation when expected in t/db_dependent/ImportBatch.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29838: Fix string interpolation in ImportBatch.t
Bug-29838-Fix-string-interpolation-in-ImportBatcht.patch (text/plain), 1.79 KB, created by
Tomás Cohen Arazi
on 2022-01-12 18:24:50 UTC
(
hide
)
Description:
Bug 29838: Fix string interpolation in ImportBatch.t
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2022-01-12 18:24:50 UTC
Size:
1.79 KB
patch
obsolete
>From 395dd1ae06ba28f67412f35fe3d6988314b83bfe Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Jan 2022 11:34:27 +0100 >Subject: [PATCH] Bug 29838: Fix string interpolation in ImportBatch.t > >Test plan: >Tests should return green > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/ImportBatch.t | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t >index b24d835974..11167622ff 100755 >--- a/t/db_dependent/ImportBatch.t >+++ b/t/db_dependent/ImportBatch.t >@@ -175,13 +175,13 @@ my $id_import_batch3 = C4::ImportBatch::AddImportBatch($sample_import_batch3); > > # Test CleanBatch > C4::ImportBatch::CleanBatch( $id_import_batch3 ); >-my $batch3_clean = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$id_import_batch3"'); >-is( $batch3_clean, "0E0", "Batch 3 has been cleaned" ); >+my $import_record = get_import_record( $id_import_batch3 ); >+is( $import_record, "0E0", "Batch 3 has been cleaned" ); > > # Test DeleteBatch > C4::ImportBatch::DeleteBatch( $id_import_batch3 ); >-my $batch3_results = $dbh->do('SELECT * FROM import_batches WHERE import_batch_id = "$id_import_batch3"'); >-is( $batch3_results, "0E0", "Batch 3 has been deleted"); >+my $import_batch = C4::ImportBatch::GetImportBatch( $id_import_batch3 ); >+is( $import_batch, undef, "Batch 3 has been deleted"); > > subtest "RecordsFromMarcPlugin" => sub { > plan tests => 5; >@@ -214,4 +214,9 @@ subtest "RecordsFromMarcPlugin" => sub { > 'Checked one field in second record' ); > }; > >+sub get_import_record { >+ my $id_import_batch = shift; >+ return $dbh->do('SELECT * FROM import_records WHERE import_batch_id = ?', undef, $id_import_batch); >+} >+ > $schema->storage->txn_rollback; >-- >2.32.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 29838
:
129244
| 129358