Lines 19-24
use Modern::Perl;
Link Here
|
19 |
|
19 |
|
20 |
use Test::More tests => 3; |
20 |
use Test::More tests => 3; |
21 |
use Test::Exception; |
21 |
use Test::Exception; |
|
|
22 |
use Test::Warn; |
22 |
|
23 |
|
23 |
use t::lib::TestBuilder; |
24 |
use t::lib::TestBuilder; |
24 |
use t::lib::Mocks; |
25 |
use t::lib::Mocks; |
Lines 35-41
my $builder = t::lib::TestBuilder->new;
Link Here
|
35 |
|
36 |
|
36 |
subtest 'record() tests' => sub { |
37 |
subtest 'record() tests' => sub { |
37 |
|
38 |
|
38 |
plan tests => 8; |
39 |
plan tests => 9; |
39 |
|
40 |
|
40 |
$schema->storage->txn_begin; |
41 |
$schema->storage->txn_begin; |
41 |
|
42 |
|
Lines 60-67
subtest 'record() tests' => sub {
Link Here
|
60 |
} |
61 |
} |
61 |
); |
62 |
); |
62 |
|
63 |
|
63 |
throws_ok { $bad_data->record; } |
64 |
warning_like |
64 |
'Koha::Exceptions::Metadata::Invalid', 'Exception thrown on bad record'; |
65 |
{ throws_ok { $bad_data->record; } |
|
|
66 |
'Koha::Exceptions::Metadata::Invalid', 'Exception thrown on bad record'; } |
67 |
qr/parser error : Start tag expected, '<' not found/, |
68 |
'Warning thrown excplicitly'; |
65 |
|
69 |
|
66 |
my $exception = $@; |
70 |
my $exception = $@; |
67 |
is( $exception->id, $bad_data->id, 'id passed correctly to exception' ); |
71 |
is( $exception->id, $bad_data->id, 'id passed correctly to exception' ); |
68 |
- |
|
|