use Modern::Perl;
-use Test::More tests => 6;
+use Test::More tests => 5;
use Test::Exception;
use MARC::Field;
my $schema = Koha::Database->new->schema;
$schema->storage->txn_begin;
+my $dbh = C4::Context->dbh;
+
my $builder = t::lib::TestBuilder->new;
my $patron = $builder->build( { source => 'Borrower' } );
$patron = Koha::Patrons->find( $patron->{borrowernumber} );
};
-subtest 'subscriptions' => sub {
- plan tests => 2;
- $builder->build(
- { source => 'Subscription', value => { biblionumber => $biblio->id } }
- );
- $builder->build(
- { source => 'Subscription', value => { biblionumber => $biblio->id } }
- );
- my $biblio = Koha::Biblios->find( $biblio->id );
- my $subscriptions = $biblio->subscriptions;
- is( ref($subscriptions), 'Koha::Subscriptions',
- 'Koha::Biblio->subscriptions should return a Koha::Subscriptions object'
- );
- is( $subscriptions->count, 2, 'Koha::Biblio->subscriptions should return the correct number of subscriptions');
-};
-
subtest 'waiting_or_in_transit' => sub {
plan tests => 4;
my $biblio = $builder->build( { source => 'Biblio' } );