|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 6; |
20 |
use Test::More tests => 7; |
| 21 |
|
21 |
|
| 22 |
use C4::Biblio; |
22 |
use C4::Biblio; |
| 23 |
use Koha::Database; |
23 |
use Koha::Database; |
|
Lines 146-148
subtest 'get_coins and get_openurl' => sub {
Link Here
|
| 146 |
|
146 |
|
| 147 |
$schema->storage->txn_rollback; |
147 |
$schema->storage->txn_rollback; |
| 148 |
}; |
148 |
}; |
| 149 |
- |
149 |
|
|
|
150 |
subtest 'is_serial() tests' => sub { |
| 151 |
|
| 152 |
plan tests => 3; |
| 153 |
|
| 154 |
$schema->storage->txn_begin; |
| 155 |
|
| 156 |
my $biblio = $builder->build_sample_biblio(); |
| 157 |
|
| 158 |
$biblio->serial( 1 )->store->discard_changes; |
| 159 |
ok( $biblio->is_serial, 'Bibliographic record is serial' ); |
| 160 |
|
| 161 |
$biblio->serial( 0 )->store->discard_changes; |
| 162 |
ok( !$biblio->is_serial, 'Bibliographic record is not serial' ); |
| 163 |
|
| 164 |
my $record = $biblio->metadata->record; |
| 165 |
$record->leader('00142nas a22 7a 4500'); |
| 166 |
ModBiblio($record, $biblio->biblionumber ); |
| 167 |
$biblio = Koha::Biblios->find($biblio->biblionumber); |
| 168 |
|
| 169 |
ok( $biblio->is_serial, 'Bibliographic record is serial' ); |
| 170 |
|
| 171 |
$schema->storage->txn_rollback; |
| 172 |
}; |