From ee272287602ef8b84c6585835febaae3266918c2 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Wed, 15 Feb 2017 08:43:51 +0000 Subject: [PATCH] Modified to run properly the QA tests https://bugs.koha-community.org/show_bug.cgi?id=15408 --- C4/Budgets.pm | 2 +- t/db_dependent/Budgets.t | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index b7b43c9..8564f79 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -1161,7 +1161,7 @@ sub CloneBudgetHierarchy { my $tidy_budget = { map { join( ' ', @columns ) =~ /$_/ ? ( $_ => $budget->{$_} ) : () } keys %$budget }; - delete $tidy_budget->{timestamp}; + delete $tidy_budget->{timestamp}; my $new_budget_id = AddBudget( { %$tidy_budget, diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t index 3a9179c..9896164 100755 --- a/t/db_dependent/Budgets.t +++ b/t/db_dependent/Budgets.t @@ -392,14 +392,11 @@ is($budget_period_cloned->{budget_period_description}, 'Budget Period Cloned', ' my $budget_cloned = C4::Budgets::GetBudgets({ budget_period_id => $budget_period_id_cloned }); my $test = $budget_cloned->[0]->{timestamp}; -warn $test; my $budget_time = Koha::DateUtils::dt_from_string($test); my $local_time = Koha::DateUtils::dt_from_string(); -warn $budget_time; -warn $local_time; -is(DateTime::compare($budget_time, $local_time), 0); +is(DateTime::compare($budget_time, $local_time), 0, "New budget got the right timestamp"); -- 2.7.4