|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 11; |
22 |
use Test::More tests => 12; |
| 23 |
|
23 |
|
| 24 |
use Test::Exception; |
24 |
use Test::Exception; |
| 25 |
use Test::MockModule; |
25 |
use Test::MockModule; |
|
Lines 67-72
subtest 'store() tests' => sub {
Link Here
|
| 67 |
$schema->storage->txn_rollback; |
67 |
$schema->storage->txn_rollback; |
| 68 |
}; |
68 |
}; |
| 69 |
|
69 |
|
|
|
70 |
subtest 'biblio() tests' => sub { |
| 71 |
|
| 72 |
plan tests => 1; |
| 73 |
|
| 74 |
$schema->storage->txn_begin; |
| 75 |
|
| 76 |
my $hold = $builder->build_object( |
| 77 |
{ |
| 78 |
class => 'Koha::Holds', |
| 79 |
} |
| 80 |
); |
| 81 |
|
| 82 |
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /cannot be null/ }; |
| 83 |
throws_ok { $hold->biblionumber(undef)->store; } |
| 84 |
'DBIx::Class::Exception', |
| 85 |
'reserves.biblionumber cannot be null, exception thrown'; |
| 86 |
|
| 87 |
$schema->storage->txn_rollback; |
| 88 |
}; |
| 89 |
|
| 70 |
subtest 'fill() tests' => sub { |
90 |
subtest 'fill() tests' => sub { |
| 71 |
|
91 |
|
| 72 |
plan tests => 14; |
92 |
plan tests => 14; |
| 73 |
- |
|
|