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

(-)a/t/db_dependent/Koha/Biblio.t (-2 / +25 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 32;
20
use Test::More tests => 33;
21
use Test::Exception;
21
use Test::Exception;
22
use Test::Warn;
22
use Test::Warn;
23
23
Lines 148-153 subtest 'items() tests' => sub { Link Here
148
148
149
};
149
};
150
150
151
subtest 'bookable_items() tests' => sub {
152
    plan tests => 3;
153
154
    $schema->storage->txn_begin;
155
156
    my $biblio = $builder->build_sample_biblio();
157
158
    # bookable items
159
    my $bookable_item1 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, bookable => 1 } );
160
161
    # not bookable items
162
    my $non_bookable_item1 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, bookable => 0 } );
163
    my $non_bookable_item2 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, bookable => 0 } );
164
165
    is( ref( $biblio->bookable_items ), 'Koha::Items', "bookable_items returns a Koha::Items resultset" );
166
    is( $biblio->bookable_items->count, 1,             "bookable_items returns the correct number of items" );
167
    is(
168
        $biblio->bookable_items->next->itemnumber, $bookable_item1->itemnumber,
169
        "bookable_items returned the correct item"
170
    );
171
172
    $schema->storage->txn_rollback;
173
};
174
151
subtest 'get_coins and get_openurl' => sub {
175
subtest 'get_coins and get_openurl' => sub {
152
176
153
    plan tests => 4;
177
    plan tests => 4;
154
- 

Return to bug 35248