Lines 1117-1127
subtest 'ModItemFromMarc' => sub {
Link Here
|
1117 |
$item->permanent_location(""); |
1117 |
$item->permanent_location(""); |
1118 |
$item->location('E'); |
1118 |
$item->location('E'); |
1119 |
$marc = C4::Items::Item2Marc( $item->unblessed, $item->biblionumber ); |
1119 |
$marc = C4::Items::Item2Marc( $item->unblessed, $item->biblionumber ); |
|
|
1120 |
$marc->field('952')->add_subfields( "C", "" ); |
1120 |
ModItemFromMarc( $marc, $item->biblionumber, $item->itemnumber ); |
1121 |
ModItemFromMarc( $marc, $item->biblionumber, $item->itemnumber ); |
1121 |
$item = $item->get_from_storage; |
1122 |
$item = $item->get_from_storage; |
1122 |
is( $item->location, 'E', 'next new location set as expected' ); |
1123 |
is( $item->location, 'E', 'next new location set as expected' ); |
1123 |
is( $item->permanent_location, undef, 'permanent location is not updated if previously set as blank string' ); |
1124 |
is( $item->permanent_location, undef, 'permanent location is not updated if previously set as blank string' ); |
1124 |
|
|
|
1125 |
}; |
1125 |
}; |
1126 |
|
1126 |
|
1127 |
$schema->storage->txn_rollback; |
1127 |
$schema->storage->txn_rollback; |
1128 |
- |
|
|