Bugzilla – Attachment 99583 Details for
Bug 24294
Creating an order with ACQ framework using 00x fields doesn't work with default value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24294: (QA follow-up) Add rollback and 008 default test
Bug-24294-QA-follow-up-Add-rollback-and-008-defaul.patch (text/plain), 1.38 KB, created by
Marcel de Rooy
on 2020-02-25 13:43:27 UTC
(
hide
)
Description:
Bug 24294: (QA follow-up) Add rollback and 008 default test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-02-25 13:43:27 UTC
Size:
1.38 KB
patch
obsolete
>From 6dceec4ca93f08d687694d38e0dcc8150b495615 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 25 Feb 2020 13:40:52 +0000 >Subject: [PATCH] Bug 24294: (QA follow-up) Add rollback and 008 default test >Content-Type: text/plain; charset=utf-8 > >Default for 008 was not tested yet. >Only wondering if we should insert default values only when we meet an >undefined value. Or should we also add if we meet an empty string? Is the >latter not more realistic in MARC? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Acquisition/FillWithDefaultValues.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Acquisition/FillWithDefaultValues.t b/t/db_dependent/Acquisition/FillWithDefaultValues.t >index 8a09fdaf66..0bba1be9dc 100755 >--- a/t/db_dependent/Acquisition/FillWithDefaultValues.t >+++ b/t/db_dependent/Acquisition/FillWithDefaultValues.t >@@ -1,5 +1,5 @@ > use Modern::Perl; >-use Test::More tests => 5; >+use Test::More tests => 6; > use Test::MockModule; > > use MARC::Record; >@@ -90,3 +90,10 @@ is_deeply( > [ [ 'x', $default_x ] ], > '099$x contains the default value' > ); >+ >+# Test controlfield default >+$record->field('008')->update( undef ); >+C4::Acquisition::FillWithDefaultValues($record); >+is( $record->field('008')->data, $default_x, 'Controlfield got default' ); >+ >+$schema->storage->txn_rollback; >-- >2.11.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 24294
:
96732
|
96777
|
99582
| 99583