|
Lines 20-26
Link Here
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
use utf8; |
21 |
use utf8; |
| 22 |
|
22 |
|
| 23 |
use Test::More tests => 34; |
23 |
use Test::More tests => 35; |
| 24 |
use Test::Exception; |
24 |
use Test::Exception; |
| 25 |
use Test::MockModule; |
25 |
use Test::MockModule; |
| 26 |
|
26 |
|
|
Lines 843-848
subtest 'request_transfer' => sub {
Link Here
|
| 843 |
$schema->storage->txn_rollback; |
843 |
$schema->storage->txn_rollback; |
| 844 |
}; |
844 |
}; |
| 845 |
|
845 |
|
|
|
846 |
subtest 'store check barcodes' => sub { |
| 847 |
|
| 848 |
plan tests => 3; |
| 849 |
|
| 850 |
$schema->storage->txn_begin; |
| 851 |
|
| 852 |
my $biblio = $builder->build_sample_biblio(); |
| 853 |
|
| 854 |
my $item = $builder->build_sample_item( |
| 855 |
{ |
| 856 |
biblionumber => $biblio->biblionumber, |
| 857 |
} |
| 858 |
); |
| 859 |
|
| 860 |
$item->barcode("")->store(); |
| 861 |
is( $item->barcode, undef, 'Empty string barcodes are treated as undef'); |
| 862 |
|
| 863 |
$item->barcode("123456789")->store(); |
| 864 |
is( $item->barcode, "123456789", 'Non-empty string barcodes are unchanged'); |
| 865 |
|
| 866 |
$item->barcode(undef)->store(); |
| 867 |
is( $item->barcode, undef, 'undef barcodes remain undef'); |
| 868 |
}; |
| 846 |
subtest 'deletion' => sub { |
869 |
subtest 'deletion' => sub { |
| 847 |
plan tests => 15; |
870 |
plan tests => 15; |
| 848 |
|
871 |
|
| 849 |
- |
|
|