Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 17; |
20 |
use Test::More tests => 18; |
21 |
use Test::Exception; |
21 |
use Test::Exception; |
22 |
use Test::Warn; |
22 |
use Test::Warn; |
23 |
use DateTime; |
23 |
use DateTime; |
Lines 26-31
use C4::Context;
Link Here
|
26 |
use C4::Circulation; # AddIssue |
26 |
use C4::Circulation; # AddIssue |
27 |
use C4::Biblio; # AddBiblio |
27 |
use C4::Biblio; # AddBiblio |
28 |
|
28 |
|
|
|
29 |
use Koha::Acquisition::Baskets; |
29 |
use Koha::Database; |
30 |
use Koha::Database; |
30 |
use Koha::DateUtils qw( dt_from_string ); |
31 |
use Koha::DateUtils qw( dt_from_string ); |
31 |
use Koha::Libraries; |
32 |
use Koha::Libraries; |
Lines 737-739
subtest 'unblessed_all_relateds' => sub {
Link Here
|
737 |
|
738 |
|
738 |
$schema->storage->txn_rollback; |
739 |
$schema->storage->txn_rollback; |
739 |
}; |
740 |
}; |
|
|
741 |
|
742 |
subtest 'prefetch_whitelist() tests' => sub { |
743 |
|
744 |
plan tests => 2; |
745 |
|
746 |
$schema->storage->txn_begin; |
747 |
|
748 |
my $basket = Koha::Acquisition::Basket->new; |
749 |
|
750 |
my $prefetch_whitelist = $basket->prefetch_whitelist; |
751 |
|
752 |
ok( |
753 |
exists $prefetch_whitelist->{basket_group}, |
754 |
'Relationship matching method name is listed' |
755 |
); |
756 |
is( |
757 |
$prefetch_whitelist->{basket_group}, |
758 |
'Koha::Acquisition::BasketGroup', |
759 |
'Guessed the object class correctly' |
760 |
); |
761 |
|
762 |
$schema->storage->txn_rollback; |
763 |
}; |