Bugzilla – Attachment 142298 Details for
Bug 31644
MARCModification template fails to copy to/from subfield 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31644: Unit test
Bug-31644-Unit-test.patch (text/plain), 2.94 KB, created by
Marcel de Rooy
on 2022-10-21 07:46:14 UTC
(
hide
)
Description:
Bug 31644: Unit test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-10-21 07:46:14 UTC
Size:
2.94 KB
patch
obsolete
>From 3d1f544d4823e9e07087f171060fe831d86c9b40 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 29 Sep 2022 12:36:11 +0000 >Subject: [PATCH] Bug 31644: Unit test >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/MarcModificationTemplates.t | 35 ++++++++++++++++------ > 1 file changed, 26 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/MarcModificationTemplates.t b/t/db_dependent/MarcModificationTemplates.t >index 82d8a29463..14a1757c8a 100755 >--- a/t/db_dependent/MarcModificationTemplates.t >+++ b/t/db_dependent/MarcModificationTemplates.t >@@ -1,6 +1,6 @@ > use Modern::Perl; > >-use Test::More tests => 126; >+use Test::More tests => 127; > > use Koha::Database; > use Koha::SimpleMARC; >@@ -691,6 +691,11 @@ sub new_record_0 { > a => 'Computer programming.', > 9 => '462', > ), >+ MARC::Field->new( >+ 590, ' ', '0', >+ 0 => 'Zeroth', >+ a => 'Appolo', >+ ), > ); > $record->append_fields(@fields); > return $record; >@@ -704,6 +709,8 @@ sub expected_record_0 { > 100, '1', ' ', > a => 'Knuth, Donald Ervin', > d => '1938', >+ 0 => 'TestUpdated', >+ 0 => 'TestUpdated', > ), > MARC::Field->new( > 245, '1', '4', >@@ -718,25 +725,26 @@ sub expected_record_0 { > 9 => '462', > ), > MARC::Field->new( >- 600, ' ', ' ', >- 0 => 'TestUpdated', >+ 590, ' ', '0', >+ 0 => 'Zeroth', >+ a => 'Appolo', > ), > MARC::Field->new( > 600, ' ', ' ', > 0 => 'TestUpdated', > ), > MARC::Field->new( >- 100, ' ', ' ', >- 0 => 'TestUpdated', >- ), >- MARC::Field->new( >- 100, ' ', ' ', >+ 600, ' ', ' ', > 0 => 'TestUpdated', > ), > MARC::Field->new( > 700, ' ', ' ', > 0 => '12345', > ), >+ MARC::Field->new( >+ 690, ' ', ' ', >+ 0 => 'Zeroth', >+ ), > ); > $record->append_fields(@fields); > return $record; >@@ -802,8 +810,17 @@ is( AddModificationTemplateAction( > 'Action 6: Copy and replace subfield 245$0 to 700$0' > ), 1, 'Action 6: Copy and replace subfield 245$0 to 700$0'); > >+# Copy subfield 590$0 to 690$0 >+is( AddModificationTemplateAction( >+ $template_id, 'copy_field', 0, >+ '590', '0', '', '690', '0', >+ '', '', '', >+ '', '', '', '', '', '', >+ 'Action 7: Copy subfield 590$0 to 690$0' >+), 1, 'Action 7: Copy subfield 590$0 to 690$0'); >+ > my @actions_0 = GetModificationTemplateActions( $template_id ); >-is( @actions_0, 6, "6 actions are inserted"); >+is( @actions_0, 7, "7 actions are inserted"); > > ModifyRecordWithTemplate( $template_id, $record ); > my $expected_record_0 = expected_record_0(); >-- >2.30.2
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 31644
:
141066
|
141091
|
141092
|
141093
|
141936
|
141937
|
141938
| 142298 |
142299
|
142300
|
142301