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 783-786 subtest "from_api_mapping() tests" => sub { Link Here
783
    );
783
    );
784
784
785
    $schema->storage->txn_rollback;
785
    $schema->storage->txn_rollback;
786
};
786
};
787
788
subtest 'prefetch_whitelist() tests' => sub {
789
790
    plan tests => 2;
791
792
    $schema->storage->txn_begin;
793
794
    my $baskets = Koha::Acquisition::Baskets->new;
795
796
    my $prefetch_whitelist = $baskets->prefetch_whitelist;
797
798
    ok(
799
        exists $prefetch_whitelist->{basket_group},
800
        'Relationship matching method name is listed'
801
    );
802
    is(
803
        $prefetch_whitelist->{basket_group},
804
        'Koha::Acquisition::BasketGroup',
805
        'Guessed the object class correctly'
806
    );
807
808
    $schema->storage->txn_rollback;
809
};
787
- 

Return to bug 24356