Lines 1-6
Link Here
|
1 |
use strict; |
1 |
use strict; |
2 |
use warnings; |
2 |
use warnings; |
3 |
use Test::More tests=>20; |
3 |
use Test::More tests => 22; |
4 |
|
4 |
|
5 |
BEGIN {use_ok('C4::Budgets') } |
5 |
BEGIN {use_ok('C4::Budgets') } |
6 |
use C4::Dates; |
6 |
use C4::Dates; |
Lines 94-99
ok($budget_id=AddBudget(
Link Here
|
94 |
|
94 |
|
95 |
my $budget; |
95 |
my $budget; |
96 |
ok($budget=GetBudget($budget_id) ,"GetBudget OK"); |
96 |
ok($budget=GetBudget($budget_id) ,"GetBudget OK"); |
|
|
97 |
$budget_id = $budget->{budget_id}; |
97 |
$$budget{budget_permission}=1; |
98 |
$$budget{budget_permission}=1; |
98 |
ok($mod_status=ModBudget($budget),"ModBudget OK"); |
99 |
ok($mod_status=ModBudget($budget),"ModBudget OK"); |
99 |
ok(GetBudgets()>0, |
100 |
ok(GetBudgets()>0, |
Lines 109-114
ok(GetBudgets({budget_period_id=>GetBudgetPeriod($bpid)->{budget_period_id}},[{"
Link Here
|
109 |
my $budget_name = GetBudgetName( $budget_id ); |
110 |
my $budget_name = GetBudgetName( $budget_id ); |
110 |
is($budget_name, $budget->{budget_name}, "Test the GetBudgetName routine"); |
111 |
is($budget_name, $budget->{budget_name}, "Test the GetBudgetName routine"); |
111 |
|
112 |
|
|
|
113 |
my $budget_code = $budget->{budget_code}; |
114 |
my $budget_by_code = GetBudgetByCode( $budget_code ); |
115 |
is($budget_by_code->{budget_id}, $budget_id, "GetBudgetByCode, check id"); |
116 |
is($budget_by_code->{budget_notes}, 'This is a note', "GetBudgetByCode, check notes"); |
117 |
|
112 |
my $second_budget_id; |
118 |
my $second_budget_id; |
113 |
ok($second_budget_id=AddBudget( |
119 |
ok($second_budget_id=AddBudget( |
114 |
{ budget_code => "ZZZZ", |
120 |
{ budget_code => "ZZZZ", |
115 |
- |
|
|