|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 2; |
22 |
use Test::More tests => 3; |
| 23 |
|
23 |
|
| 24 |
use C4::Biblio; |
24 |
use C4::Biblio; |
| 25 |
use C4::Items; |
25 |
use C4::Items; |
|
Lines 116-121
subtest 'can_be_transferred' => sub {
Link Here
|
| 116 |
.' invalid library is given.'); |
116 |
.' invalid library is given.'); |
| 117 |
}; |
117 |
}; |
| 118 |
|
118 |
|
|
|
119 |
subtest 'title_remainder' => sub { |
| 120 |
plan tests => 1; |
| 121 |
|
| 122 |
my ($bibnum, $title, $bibitemnum) = create_helper_biblio('BK'); |
| 123 |
|
| 124 |
my $biblio = Koha::Biblios->find($bibnum); |
| 125 |
is($biblio->title_remainder, 'Remainder', 'Got remainder of title'); |
| 126 |
}; |
| 127 |
|
| 119 |
$schema->storage->txn_rollback; |
128 |
$schema->storage->txn_rollback; |
| 120 |
|
129 |
|
| 121 |
|
130 |
|
|
Lines 127-133
sub create_helper_biblio {
Link Here
|
| 127 |
$title = 'Silence in the library'; |
136 |
$title = 'Silence in the library'; |
| 128 |
$bib->append_fields( |
137 |
$bib->append_fields( |
| 129 |
MARC::Field->new('100', ' ', ' ', a => 'Moffat, Steven'), |
138 |
MARC::Field->new('100', ' ', ' ', a => 'Moffat, Steven'), |
| 130 |
MARC::Field->new('245', ' ', ' ', a => $title), |
139 |
MARC::Field->new('245', ' ', ' ', a => $title, b => 'Remainder'), |
| 131 |
MARC::Field->new('942', ' ', ' ', c => $itemtype), |
140 |
MARC::Field->new('942', ' ', ' ', c => $itemtype), |
| 132 |
); |
141 |
); |
| 133 |
return ($bibnum, $title, $bibitemnum) = AddBiblio($bib, ''); |
142 |
return ($bibnum, $title, $bibitemnum) = AddBiblio($bib, ''); |
| 134 |
- |
|
|