|
Lines 565-571
subtest 'get_marc_components() tests' => sub {
Link Here
|
| 565 |
}; |
565 |
}; |
| 566 |
|
566 |
|
| 567 |
subtest 'get_components_query' => sub { |
567 |
subtest 'get_components_query' => sub { |
| 568 |
plan tests => 4; |
568 |
plan tests => 5; |
| 569 |
|
569 |
|
| 570 |
my $biblio = $builder->build_sample_biblio(); |
570 |
my $biblio = $builder->build_sample_biblio(); |
| 571 |
my $biblionumber = $biblio->biblionumber; |
571 |
my $biblionumber = $biblio->biblionumber; |
|
Lines 592-598
subtest 'get_components_query' => sub {
Link Here
|
| 592 |
$biblio->metadata->metadata('This is invalid for a MARC record')->store(); |
592 |
$biblio->metadata->metadata('This is invalid for a MARC record')->store(); |
| 593 |
$biblio = Koha::Biblios->find( $biblio->biblionumber); |
593 |
$biblio = Koha::Biblios->find( $biblio->biblionumber); |
| 594 |
|
594 |
|
| 595 |
is($biblio->get_components_query, undef, "Invalid MARC record returns undefined and does not die"); |
595 |
my $components_query; |
|
|
596 |
warning_like { $biblio->get_components_query } |
| 597 |
qr{^Invalid data, cannot decode metadata object}; |
| 598 |
is( $components_query, undef, "Invalid MARC record returns undefined and does not die"); |
| 596 |
}; |
599 |
}; |
| 597 |
|
600 |
|
| 598 |
subtest 'orders() and active_orders() tests' => sub { |
601 |
subtest 'orders() and active_orders() tests' => sub { |
| 599 |
- |
|
|