Bugzilla – Attachment 33056 Details for
Bug 11876
Add a diff view to staged MARC records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11876 [Unit test] Add a diff view to staged MARC Records
PASSED-QA-Bug-11876-Unit-test-Add-a-diff-view-to-s.patch (text/plain), 2.85 KB, created by
Kyle M Hall (khall)
on 2014-10-31 12:31:24 UTC
(
hide
)
Description:
[PASSED QA] Bug 11876 [Unit test] Add a diff view to staged MARC Records
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-31 12:31:24 UTC
Size:
2.85 KB
patch
obsolete
>From 132d202183092db10d1ec7dffc86c7152aa58208 Mon Sep 17 00:00:00 2001 >From: simith <simith@inlibro.com> >Date: Thu, 30 Oct 2014 12:40:57 -0400 >Subject: [PATCH] [PASSED QA] Bug 11876 [Unit test] Add a diff view to staged MARC Records > >Unit test added > >http://bugs.koha-community.org/show_bug.cgi?id=11876 >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/ImportBatch.t | 72 ++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 72 insertions(+), 0 deletions(-) > create mode 100644 t/db_dependent/ImportBatch.t > >diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t >new file mode 100644 >index 0000000..95e20cd >--- /dev/null >+++ b/t/db_dependent/ImportBatch.t >@@ -0,0 +1,72 @@ >+#!/usr/bin/perl >+ >+use Modern::Perl; >+ >+use C4::Context; >+ >+use Test::More tests => 5; >+ >+BEGIN { >+ use_ok('C4::ImportBatch'); >+} >+ >+# Start transaction >+my $dbh = C4::Context->dbh; >+$dbh->{AutoCommit} = 0; >+$dbh->{RaiseError} = 1; >+ >+# clear >+$dbh->do('DELETE FROM import_batches'); >+ >+my $sample_import_batch1 = { >+ matcher_id => 1, >+ template_id => 1, >+ branchcode => 'QRT', >+ overlay_action => 'create_new', >+ nomatch_action => 'create_new', >+ item_action => 'always_add', >+ import_status => 'staged', >+ batch_type => 'z3950', >+ file_name => 'test.mrc', >+ comments => 'test', >+ record_type => 'auth', >+}; >+ >+my $sample_import_batch2 = { >+ matcher_id => 2, >+ template_id => 2, >+ branchcode => 'QRZ', >+ overlay_action => 'create_new', >+ nomatch_action => 'create_new', >+ item_action => 'always_add', >+ import_status => 'staged', >+ batch_type => 'z3950', >+ file_name => 'test.mrc', >+ comments => 'test', >+ record_type => 'auth', >+}; >+ >+my $id_import_batch1 = C4::ImportBatch::AddImportBatch($sample_import_batch1); >+my $id_import_batch2 = C4::ImportBatch::AddImportBatch($sample_import_batch2); >+ >+like( $id_import_batch1, '/^\d+$/', "AddImportBatch for sample_import_batch1 return an id" ); >+like( $id_import_batch2, '/^\d+$/', "AddImportBatch for sample_import_batch2 return an id" ); >+ >+#Test GetImportBatch >+my $importbatch2 = C4::ImportBatch::GetImportBatch( $id_import_batch2 ); >+delete $importbatch2->{upload_timestamp}; >+delete $importbatch2->{import_batch_id}; >+delete $importbatch2->{num_records}; >+delete $importbatch2->{num_items}; >+ >+is_deeply( $importbatch2, $sample_import_batch2, >+ "GetImportBatch returns the right informations about $sample_import_batch2" ); >+ >+my $importbatch1 = C4::ImportBatch::GetImportBatch( $id_import_batch1 ); >+delete $importbatch1->{upload_timestamp}; >+delete $importbatch1->{import_batch_id}; >+delete $importbatch1->{num_records}; >+delete $importbatch1->{num_items}; >+ >+is_deeply( $importbatch1, $sample_import_batch1, >+ "GetImportBatch returns the right informations about $sample_import_batch1" ); >-- >1.7.2.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 11876
:
25743
|
30590
|
30591
|
30787
|
30797
|
30798
|
30799
|
30800
|
31835
|
31847
|
31871
|
31872
|
31873
|
31874
|
32987
|
32995
|
33052
|
33053
|
33054
|
33055
| 33056