Bugzilla – Attachment 74929 Details for
Bug 20678
Save draft records without committing them to the catalogue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20678 - Added unit test for new subroutine DeleteBiblioInBatch()
Bug-20678---Added-unit-test-for-new-subroutine-Del.patch (text/plain), 1.69 KB, created by
Alex Buckley
on 2018-04-29 23:44:21 UTC
(
hide
)
Description:
Bug 20678 - Added unit test for new subroutine DeleteBiblioInBatch()
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-04-29 23:44:21 UTC
Size:
1.69 KB
patch
obsolete
>From a85b8080d8c8b0ec68f99466efb331c57b8693f3 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sun, 29 Apr 2018 14:09:55 +0000 >Subject: [PATCH] Bug 20678 - Added unit test for new subroutine > DeleteBiblioInBatch() > >This new subroutine is in C4/ImportBatches.pm and it calls a new >internal subroutine _delete_import_record_marc > >Test plan: >1.Enter koha shell: sudo koha-shell <instancename> >2. perl t/db_dependent/ImportBatch.pm >3. Notice unit test 12 passes: 'ok 12 - No biblio expected since we >deleted the biblio from the batch' > >Sponsored-By: Toi Ohomai Institute of Technology >--- > t/db_dependent/ImportBatch.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t >index 788be3f..18d4f24 100644 >--- a/t/db_dependent/ImportBatch.t >+++ b/t/db_dependent/ImportBatch.t >@@ -1,7 +1,7 @@ > #!/usr/bin/perl > > use Modern::Perl; >-use Test::More tests => 14; >+use Test::More tests => 15; > use Cwd qw(abs_path); > use File::Temp qw/tempfile/; > >@@ -144,6 +144,11 @@ $dbh->do( "DELETE FROM items WHERE itemnumber=?", undef, $itemno ); > is( @a, 0, 'No item numbers expected since we deleted the item' ); > $dbh->do( $sql, undef, undef, $import_record_id ); # remove link again > >+#Test DeleteBiblioInBatch >+my @a = DeleteBiblioInBatch( $import_record_id); #Remove the MARC record from import_biblios and import_records tables >+my $biblio_in_import_records = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$import_record_id"'); >+is( $biblio_in_import_records, "0E0", 'No biblio expected since we deleted the biblio from the batch' ); >+ > # fresh data > my $sample_import_batch3 = { > matcher_id => 3, >-- >2.1.4
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 20678
:
74922
|
74928
|
74929
|
74960
|
74961
|
74962
|
75192
|
75193
|
78021
|
78920
|
92248
|
107454
|
107472