Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 1; |
22 |
use Test::More tests => 2; |
23 |
|
23 |
|
24 |
use t::lib::TestBuilder; |
24 |
use t::lib::TestBuilder; |
25 |
|
25 |
|
Lines 42-44
subtest 'to_api() tests' => sub {
Link Here
|
42 |
|
42 |
|
43 |
$schema->storage->txn_rollback; |
43 |
$schema->storage->txn_rollback; |
44 |
}; |
44 |
}; |
45 |
- |
45 |
|
|
|
46 |
subtest 'budget' => sub { |
47 |
plan tests => 1; |
48 |
|
49 |
$schema->storage->txn_begin; |
50 |
my $f = $builder->build_object( |
51 |
{ |
52 |
class => 'Koha::Acquisition::Funds', |
53 |
} |
54 |
); |
55 |
|
56 |
my $fund = Koha::Acquisition::Funds->find( $f->budget_id ); |
57 |
is( ref( $fund->budget ), |
58 |
'Koha::Acquisition::Budget', |
59 |
'->fund should return a Koha::Acquisition::Budget object' ); |
60 |
$schema->storage->txn_rollback; |
61 |
}; |