[Koha-bugs] [Bug 21618] side-effects with timestamp columns with Test::DBIx::Class
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Oct 19 12:49:06 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21618
--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
I have isolated the issue with this code. I do not understand why the default
value (CURRENT_TIMESTAMP) is not picked.
#!/usr/bin/perl
use Modern::Perl;
use Test::MockModule;
use Koha::Patrons;
use Koha::Patron::Categories;
use Test::DBIx::Class {
schema_class => 'Koha::Schema',
connect_info => [ 'dbi:SQLite:dbname=:memory:', '', '' ]
};
my $database = Test::MockModule->new('Koha::Database');
$database->mock(
_new_schema => sub { return Schema(); }
);
Koha::Patron::Category->new({categorycode => 'S'})->store;
my $borrower = {
categorycode => 'S',
userid => 'test4321',
};
my $patron = Koha::Patron->new( $borrower )->store;
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list