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

(-)a/t/db_dependent/Koha/Object.t (-1 / +25 lines)
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
};
(-)a/t/db_dependent/Koha/Objects.t (-3 / +25 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 20;
22
use Test::More tests => 21;
23
use Test::Exception;
23
use Test::Exception;
24
use Test::Warn;
24
use Test::Warn;
25
25
Lines 776-779 subtest "from_api_mapping() tests" => sub { Link Here
776
    );
776
    );
777
777
778
    $schema->storage->txn_rollback;
778
    $schema->storage->txn_rollback;
779
};
779
};
780
781
subtest 'prefetch_whitelist() tests' => sub {
782
783
    plan tests => 2;
784
785
    $schema->storage->txn_begin;
786
787
    my $baskets = Koha::Acquisition::Baskets->new;
788
789
    my $prefetch_whitelist = $baskets->prefetch_whitelist;
790
791
    ok(
792
        exists $prefetch_whitelist->{basket_group},
793
        'Relationship matching method name is listed'
794
    );
795
    is(
796
        $prefetch_whitelist->{basket_group},
797
        'Koha::Acquisition::BasketGroup',
798
        'Guessed the object class correctly'
799
    );
800
801
    $schema->storage->txn_rollback;
802
};
780
- 

Return to bug 24356