Lines 1-6
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
use Modern::Perl; |
2 |
use Modern::Perl; |
3 |
use Test::More tests => 145; |
3 |
use Test::More tests => 146; |
4 |
|
4 |
|
5 |
BEGIN { |
5 |
BEGIN { |
6 |
use_ok('C4::Budgets') |
6 |
use_ok('C4::Budgets') |
Lines 14-19
use Koha::Acquisition::Orders;
Link Here
|
14 |
use Koha::Patrons; |
14 |
use Koha::Patrons; |
15 |
|
15 |
|
16 |
use t::lib::TestBuilder; |
16 |
use t::lib::TestBuilder; |
|
|
17 |
use Koha::DateUtils; |
17 |
|
18 |
|
18 |
use YAML; |
19 |
use YAML; |
19 |
|
20 |
|
Lines 488-493
my $budget_period_id_cloned = C4::Budgets::CloneBudgetPeriod(
Link Here
|
488 |
my $budget_period_cloned = C4::Budgets::GetBudgetPeriod($budget_period_id_cloned); |
489 |
my $budget_period_cloned = C4::Budgets::GetBudgetPeriod($budget_period_id_cloned); |
489 |
is($budget_period_cloned->{budget_period_description}, 'Budget Period Cloned', 'Cloned budget\'s description is updated.'); |
490 |
is($budget_period_cloned->{budget_period_description}, 'Budget Period Cloned', 'Cloned budget\'s description is updated.'); |
490 |
|
491 |
|
|
|
492 |
my $budget_cloned = C4::Budgets::GetBudgets({ budget_period_id => $budget_period_id_cloned }); |
493 |
my $test = $budget_cloned->[0]->{timestamp}; |
494 |
my $budget_time = Koha::DateUtils::dt_from_string($test); |
495 |
my $local_time = Koha::DateUtils::dt_from_string(); |
496 |
|
497 |
|
498 |
is(DateTime::compare($budget_time, $local_time), 0, "New budget got the right timestamp"); |
499 |
|
500 |
|
501 |
|
491 |
my $budget_hierarchy = GetBudgetHierarchy($budget_period_id); |
502 |
my $budget_hierarchy = GetBudgetHierarchy($budget_period_id); |
492 |
my $budget_hierarchy_cloned = GetBudgetHierarchy($budget_period_id_cloned); |
503 |
my $budget_hierarchy_cloned = GetBudgetHierarchy($budget_period_id_cloned); |
493 |
|
504 |
|
494 |
- |
|
|