When created without Koha::Biblio.
Fix for:
Field 'datecreated' doesn't have a default value
t/db_dependent/Items.t
TODO LATER - Use Koha::Biblio instead
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
use MARC::Record;
use C4::Biblio;
use Koha::Database;
+use Koha::DateUtils qw( dt_from_string );
use Koha::Library;
use t::lib::Mocks;
my $biblio = $schema->resultset('Biblio')->create({
title => "Test title",
+ datecreated => dt_from_string,
biblioitems => [ { itemtype => 'BIB_LEVEL' } ],
});
my $biblioitem = $biblio->biblioitems->first;