Lines 858-869
subtest 'store check barcodes' => sub {
Link Here
|
858 |
); |
858 |
); |
859 |
|
859 |
|
860 |
$item->barcode("")->store(); |
860 |
$item->barcode("")->store(); |
|
|
861 |
$item->discard_changes; |
861 |
is( $item->barcode, undef, 'Empty string barcodes are treated as undef'); |
862 |
is( $item->barcode, undef, 'Empty string barcodes are treated as undef'); |
862 |
|
863 |
|
863 |
$item->barcode("123456789")->store(); |
864 |
$item->barcode("123456789")->store(); |
|
|
865 |
$item->discard_changes; |
864 |
is( $item->barcode, "123456789", 'Non-empty string barcodes are unchanged'); |
866 |
is( $item->barcode, "123456789", 'Non-empty string barcodes are unchanged'); |
865 |
|
867 |
|
866 |
$item->barcode(undef)->store(); |
868 |
$item->barcode(undef)->store(); |
|
|
869 |
$item->discard_changes; |
867 |
is( $item->barcode, undef, 'undef barcodes remain undef'); |
870 |
is( $item->barcode, undef, 'undef barcodes remain undef'); |
868 |
}; |
871 |
}; |
869 |
subtest 'deletion' => sub { |
872 |
subtest 'deletion' => sub { |
870 |
- |
|
|