From 06dafd8e74d9aa4a242b7ec8fc1b03369c71162d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 19 Mar 2020 13:05:10 +0000 Subject: [PATCH] Bug 24818: (RM follow-up) Update tests for DATE -> TIMESTAMP change Signed-off-by: Martin Renvoize --- t/db_dependent/Accounts.t | 14 ++++++-------- t/db_dependent/Koha/Account.t | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t index e4cd571ec2..8074a142de 100644 --- a/t/db_dependent/Accounts.t +++ b/t/db_dependent/Accounts.t @@ -791,7 +791,6 @@ subtest "Koha::Account::non_issues_charges tests" => sub { my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); my $account = $patron->account; - my $today = dt_from_string; my $res = 3; my $rent = 5; my $manual = 7; @@ -821,7 +820,6 @@ subtest "Koha::Account::non_issues_charges tests" => sub { Koha::Account::Line->new( { borrowernumber => $patron->borrowernumber, - date => $today, description => 'a Manual invoice fee', debit_type_code => 'Copie', amountoutstanding => $manual, @@ -969,7 +967,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { my $debit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amountoutstanding => 0, interface => 'commandline', debit_type_code => 'LOST' @@ -978,7 +976,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { my $credit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amountoutstanding => -5, interface => 'commandline', credit_type_code => 'PAYMENT' @@ -1002,7 +1000,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { $debit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amountoutstanding => 5, interface => 'commanline', debit_type_code => 'LOST' @@ -1011,7 +1009,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { $credit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amountoutstanding => 0, interface => 'commandline', credit_type_code => 'PAYMENT' @@ -1036,7 +1034,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { $debit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amountoutstanding => 0, interface => 'commandline', debit_type_code => 'LOST' @@ -1045,7 +1043,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { $credit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amountoutstanding => 0, interface => 'commandline', credit_type_code => 'PAYMENT' diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t index 5c4f25f199..ebab6b0ae5 100755 --- a/t/db_dependent/Koha/Account.t +++ b/t/db_dependent/Koha/Account.t @@ -1012,7 +1012,7 @@ subtest 'Koha::Account::Line::apply() handles lost items' => sub { my $credit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amount => -.5, amountoutstanding => -.5, interface => 'commandline', @@ -1031,7 +1031,7 @@ subtest 'Koha::Account::Line::apply() handles lost items' => sub { $credit = Koha::Account::Line->new( { borrowernumber => $patron->id, - date => '1900-01-01', + date => '1970-01-01 00:00:01', amount => -.5, amountoutstanding => -.5, interface => 'commandline', -- 2.39.5