Bug 34609: Add missing test for Koha::Hold->biblio
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
7b57163ef3
commit
7cab415f0b
1 changed files with 21 additions and 1 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 11;
|
||||
use Test::More tests => 12;
|
||||
|
||||
use Test::Exception;
|
||||
use Test::MockModule;
|
||||
|
@ -67,6 +67,26 @@ subtest 'store() tests' => sub {
|
|||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
||||
subtest 'biblio() tests' => sub {
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
my $hold = $builder->build_object(
|
||||
{
|
||||
class => 'Koha::Holds',
|
||||
}
|
||||
);
|
||||
|
||||
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /cannot be null/ };
|
||||
throws_ok { $hold->biblionumber(undef)->store; }
|
||||
'DBIx::Class::Exception',
|
||||
'reserves.biblionumber cannot be null, exception thrown';
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
||||
subtest 'fill() tests' => sub {
|
||||
|
||||
plan tests => 14;
|
||||
|
|
Loading…
Reference in a new issue