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

(-)a/t/db_dependent/Koha/Biblio.t (-2 / +22 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 4;
20
use Test::More tests => 5;
21
21
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
23
Lines 86-88 subtest 'hidden_in_opac() tests' => sub { Link Here
86
86
87
    $schema->storage->txn_rollback;
87
    $schema->storage->txn_rollback;
88
};
88
};
89
- 
89
90
subtest 'items() tests' => sub {
91
92
    plan tests => 3;
93
94
    $schema->storage->txn_begin;
95
96
    my $biblio = $builder->build_sample_biblio();
97
    my $item_1 = $builder->build_sample_item({ biblionumber => $biblio->biblionumber });
98
    my $item_2 = $builder->build_sample_item({ biblionumber => $biblio->biblionumber });
99
100
    my $items = $biblio->items;
101
    is( ref($items), 'Koha::Items', 'Returns a Koha::Items resultset' );
102
    is( $items->count, 2, 'Two items in resultset' );
103
104
    my @items = $biblio->items;
105
    is( scalar @items, 2, 'Same result, but in list context' );
106
107
    $schema->storage->txn_rollback;
108
109
};

Return to bug 22701