|
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 143-145
subtest 'get_coins and get_openurl' => sub {
Link Here
|
| 143 |
|
143 |
|
| 144 |
$schema->storage->txn_rollback; |
144 |
$schema->storage->txn_rollback; |
| 145 |
}; |
145 |
}; |
| 146 |
- |
146 |
|
|
|
147 |
subtest 'is_serial() tests' => sub { |
| 148 |
|
| 149 |
plan tests => 3; |
| 150 |
|
| 151 |
$schema->storage->txn_begin; |
| 152 |
|
| 153 |
my $biblio = $builder->build_sample_biblio(); |
| 154 |
|
| 155 |
$biblio->serial( 1 )->store->discard_changes; |
| 156 |
ok( $biblio->is_serial, 'Bibliographic record is serial' ); |
| 157 |
|
| 158 |
$biblio->serial( 0 )->store->discard_changes; |
| 159 |
ok( !$biblio->is_serial, 'Bibliographic record is not serial' ); |
| 160 |
|
| 161 |
my $record = $biblio->metadata->record; |
| 162 |
$record->leader('00142nas a22 7a 4500'); |
| 163 |
ModBiblio($record, $biblio->biblionumber ); |
| 164 |
$biblio = Koha::Biblios->find($biblio->biblionumber); |
| 165 |
|
| 166 |
ok( $biblio->is_serial, 'Bibliographic record is serial' ); |
| 167 |
|
| 168 |
$schema->storage->txn_rollback; |
| 169 |
}; |