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

(-)a/t/db_dependent/Koha/Object.t (-1 / +24 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 18;
20
use Test::More tests => 19;
21
use Test::Exception;
21
use Test::Exception;
22
use Test::Warn;
22
use Test::Warn;
23
use DateTime;
23
use DateTime;
Lines 795-797 subtest 'get_from_storage' => sub { Link Here
795
795
796
    $schema->storage->txn_rollback;
796
    $schema->storage->txn_rollback;
797
};
797
};
798
799
subtest 'prefetch_whitelist() tests' => sub {
800
801
    plan tests => 2;
802
803
    $schema->storage->txn_begin;
804
805
    my $biblio = Koha::Biblio->new;
806
807
    my $prefetch_whitelist = $biblio->prefetch_whitelist;
808
809
    ok(
810
        exists $prefetch_whitelist->{orders},
811
        'Relationship matching method name is listed'
812
    );
813
    is(
814
        $prefetch_whitelist->{orders},
815
        'Koha::Acquisition::Order',
816
        'Guessed the object class correctly'
817
    );
818
819
    $schema->storage->txn_rollback;
820
};
(-)a/t/db_dependent/Koha/Objects.t (-3 / +26 lines)
Lines 19-30 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
26
use Koha::Authority::Types;
26
use Koha::Authority::Types;
27
use Koha::Cities;
27
use Koha::Cities;
28
use Koha::Biblios;
28
use Koha::IssuingRules;
29
use Koha::IssuingRules;
29
use Koha::Patron::Category;
30
use Koha::Patron::Category;
30
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
Lines 783-786 subtest "from_api_mapping() tests" => sub { Link Here
783
    );
784
    );
784
785
785
    $schema->storage->txn_rollback;
786
    $schema->storage->txn_rollback;
786
};
787
};
788
789
subtest 'prefetch_whitelist() tests' => sub {
790
791
    plan tests => 2;
792
793
    $schema->storage->txn_begin;
794
795
    my $biblios = Koha::Biblios->new;
796
797
    my $prefetch_whitelist = $biblios->prefetch_whitelist;
798
799
    ok(
800
        exists $prefetch_whitelist->{orders},
801
        'Relationship matching method name is listed'
802
    );
803
    is(
804
        $prefetch_whitelist->{orders},
805
        'Koha::Acquisition::Order',
806
        'Guessed the object class correctly'
807
    );
808
809
    $schema->storage->txn_rollback;
810
};
787
- 

Return to bug 24356