Summary: | side-effects with timestamp columns with Test::DBIx::Class | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 21596 | ||
Bug Blocks: |
Description
Jonathan Druart
2018-10-19 10:46:29 UTC
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; Fixed by Marcel's patch on bug 21610 comment 10 *** This bug has been marked as a duplicate of bug 21610 *** |