@@ -, +, @@ --- t/db_dependent/Acquisition/FillWithDefaultValues.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/t/db_dependent/Acquisition/FillWithDefaultValues.t +++ a/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; --