|
Lines 24-30
use C4::Budgets;
Link Here
|
| 24 |
|
24 |
|
| 25 |
use Koha::DateUtils qw( dt_from_string ); |
25 |
use Koha::DateUtils qw( dt_from_string ); |
| 26 |
|
26 |
|
| 27 |
use Test::More tests => 102; |
27 |
use Test::More tests => 104; |
| 28 |
use Test::Warn; |
28 |
use Test::Warn; |
| 29 |
|
29 |
|
| 30 |
BEGIN { |
30 |
BEGIN { |
|
Lines 318-323
is(@$itemtypes2, 8, "Purchase suggestion itemtypes collected, default AdvancedSe
Link Here
|
| 318 |
|
318 |
|
| 319 |
is_deeply($itemtypes1, $itemtypes2, 'same set of purchase suggestion formats retrieved'); |
319 |
is_deeply($itemtypes1, $itemtypes2, 'same set of purchase suggestion formats retrieved'); |
| 320 |
|
320 |
|
| 321 |
$dbh->rollback; |
321 |
# Test budgetid fk |
|
|
322 |
$my_suggestion->{budgetid} = ''; # If budgetid == '', NULL should be set in DB |
| 323 |
my $my_suggestionid_test_budgetid = NewSuggestion($my_suggestion); |
| 324 |
$suggestion = GetSuggestion($my_suggestionid_test_budgetid); |
| 325 |
is( $suggestion->{budgetid}, undef, 'NewSuggestion Should set budgetid to NULL if equals an empty string' ); |
| 322 |
|
326 |
|
| 323 |
done_testing; |
327 |
$my_suggestion->{budgetid} = ''; # If budgetid == '', NULL should be set in DB |
|
|
328 |
ModSuggestion( $my_suggestion ); |
| 329 |
$suggestion = GetSuggestion($my_suggestionid_test_budgetid); |
| 330 |
is( $suggestion->{budgetid}, undef, 'NewSuggestion Should set budgetid to NULL if equals an empty string' ); |
| 324 |
- |
|
|