View | Details | Raw Unified | Return to bug 15408
Collapse All | Expand All

(-)a/t/db_dependent/Budgets.t (-2 / +15 lines)
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 => 142;
3
use Test::More tests => 143;
4
4
5
BEGIN {
5
BEGIN {
6
    use_ok('C4::Budgets')
6
    use_ok('C4::Budgets')
Lines 14-19 use Koha::Acquisition::Order; Link Here
14
use Koha::Acquisition::Booksellers;
14
use Koha::Acquisition::Booksellers;
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 389-394 my $budget_period_id_cloned = C4::Budgets::CloneBudgetPeriod( Link Here
389
my $budget_period_cloned = C4::Budgets::GetBudgetPeriod($budget_period_id_cloned);
390
my $budget_period_cloned = C4::Budgets::GetBudgetPeriod($budget_period_id_cloned);
390
is($budget_period_cloned->{budget_period_description}, 'Budget Period Cloned', 'Cloned budget\'s description is updated.');
391
is($budget_period_cloned->{budget_period_description}, 'Budget Period Cloned', 'Cloned budget\'s description is updated.');
391
392
393
my $budget_cloned = C4::Budgets::GetBudgets({ budget_period_id => $budget_period_id_cloned });
394
my $test =  $budget_cloned->[0]->{timestamp};
395
warn $test;
396
my $budget_time = Koha::DateUtils::dt_from_string($test);
397
my $local_time = Koha::DateUtils::dt_from_string();
398
warn $budget_time;
399
warn $local_time;
400
401
402
is(DateTime::compare($budget_time, $local_time), 0);
403
404
405
392
my $budget_hierarchy        = GetBudgetHierarchy($budget_period_id);
406
my $budget_hierarchy        = GetBudgetHierarchy($budget_period_id);
393
my $budget_hierarchy_cloned = GetBudgetHierarchy($budget_period_id_cloned);
407
my $budget_hierarchy_cloned = GetBudgetHierarchy($budget_period_id_cloned);
394
408
395
- 

Return to bug 15408