Bug 24448: Unit tests
[srvgit] / t / db_dependent / Koha / Biblios.t
index 2f62524..2d5acbb 100644 (file)
@@ -19,7 +19,7 @@
 
 use Modern::Perl;
 
-use Test::More tests => 6;
+use Test::More tests => 5;
 use Test::Exception;
 use MARC::Field;
 
@@ -37,6 +37,8 @@ use t::lib::Mocks;
 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} );
@@ -79,22 +81,6 @@ subtest 'holds + current_holds' => sub {
 
 };
 
-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' } );