Bugzilla – Attachment 110851 Details for
Bug 26414
Unable to export Withdrawn status using CSV profile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26414: Tidy the tests
Bug-26414-Tidy-the-tests.patch (text/plain), 3.40 KB, created by
Jonathan Druart
on 2020-09-28 13:33:25 UTC
(
hide
)
Description:
Bug 26414: Tidy the tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-09-28 13:33:25 UTC
Size:
3.40 KB
patch
obsolete
>From 3f266981ec517750afa91768e854aa4012de9738 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 28 Sep 2020 15:32:52 +0200 >Subject: [PATCH] Bug 26414: Tidy the tests > >--- > t/db_dependent/Record/marcrecord2csv.t | 61 ++++++++++++++------------ > 1 file changed, 33 insertions(+), 28 deletions(-) > >diff --git a/t/db_dependent/Record/marcrecord2csv.t b/t/db_dependent/Record/marcrecord2csv.t >index 0dcdbab0b6..18358f9f6a 100755 >--- a/t/db_dependent/Record/marcrecord2csv.t >+++ b/t/db_dependent/Record/marcrecord2csv.t >@@ -126,34 +126,39 @@ is( $csv_output, q[Title|AVs > ], q|TT way: display first subfield a for first field 245 if indicator 1 == 1 for field 100 is set| > ); > >- >- >-# Bug 26414 - Unable to export Withdrawn status using CSV profile >-# Test that subfieldtag '0' works in the fieldtag '952' >-my $record2 = new_record(); >-my $frameworkcode2 = q||; >-# We change the barcode of the second item record to prevent an error "duplicate entry" >-my $field = $record->field('952'); >-my $new_field = new MARC::Field('952', ' ', ' ', >- 0 => '1', >- p => '3010023918', >-); >-$field->replace_with($new_field); >-# We create another record >-my ( $biblionumber2, $biblioitemnumber2 ) = AddBiblio( $record2, $frameworkcode2 ); >-# We add two item to two record to test fieldtag 952 and subfieldtag 9520 >-my (undef, undef, $itemnumber2) = AddItemFromMarc($record2, $biblionumber); >-my (undef, undef, $itemnumber) = AddItemFromMarc($record, $biblionumber); >-$csv_content = q(Titre=245a|Nom de personne=100a|Statut « Ãlagué »=9520); >-my $csv_profile_id_10 = insert_csv_profile( {csv_content => $csv_content } ); >-$csv_output = C4::Record::marcrecord2csv( $biblionumber, $csv_profile_id_10, 1, $csv); >-is($csv_output, q[Titre|"Nom de personne"|"Statut « Ãlagué »" >-"The art of computer programming,The art of another title"|"Knuth, Donald Ervin"|Withdrawn;Withdrawn >-], q|subfieldtag 952$0 is not working, should return 'Withdrawn'| >-); >- >-# End Bug 26414 >- >+subtest 'Test for subfields 0' => sub { >+ plan tests => 1; >+ >+ my $record2 = new_record(); >+ my $frameworkcode2 = q||; >+ >+ # We change the barcode of the second item record to prevent an error "duplicate entry" >+ my $field = $record->field('952'); >+ my $new_field = new MARC::Field( >+ '952', ' ', ' ', >+ 0 => '1', >+ p => '3010023918', >+ ); >+ $field->replace_with($new_field); >+ >+ # We create another record >+ my ( $biblionumber2, $biblioitemnumber2 ) = AddBiblio( $record2, $frameworkcode2 ); >+ >+ # We add two item to two record to test fieldtag 952 and subfieldtag 9520 >+ my ( undef, undef, $itemnumber2 ) = AddItemFromMarc( $record2, $biblionumber ); >+ my ( undef, undef, $itemnumber ) = AddItemFromMarc( $record, $biblionumber ); >+ $csv_content = q(Titre=245a|Nom de personne=100a|Statut « Ãlagué »=9520); >+ my $csv_profile_id_10 = insert_csv_profile( { csv_content => $csv_content } ); >+ $csv_output = C4::Record::marcrecord2csv( $biblionumber, $csv_profile_id_10, 1, $csv ); >+ is_deeply( >+ [ split "\n", $csv_output ], >+ [ >+ q[Titre|"Nom de personne"|"Statut « Ãlagué »"], >+ q["The art of computer programming,The art of another title"|"Knuth, Donald Ervin"|Withdrawn;Withdrawn], >+ ], >+ "subfieldtag 952$0 is not working, should return 'Withdrawn'" >+ ); >+}; > > sub insert_csv_profile { > my ( $params ) = @_; >-- >2.20.1
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 26414
:
109970
|
110132
|
110479
|
110492
|
110515
|
110851
|
110852