Lines 984-990
subtest 'ModItemFromMarc' => sub {
Link Here
|
984 |
my $item = Koha::Items->find($itemnumber); |
984 |
my $item = Koha::Items->find($itemnumber); |
985 |
is( $item->itemlost, 1, 'itemlost picked from the item marc'); |
985 |
is( $item->itemlost, 1, 'itemlost picked from the item marc'); |
986 |
|
986 |
|
987 |
$item->paidfor("this is something")->store; |
987 |
$item->new_status("this is something")->store; |
988 |
|
988 |
|
989 |
my $updated_item_record = new MARC::Record; |
989 |
my $updated_item_record = new MARC::Record; |
990 |
$updated_item_record->append_fields( |
990 |
$updated_item_record->append_fields( |
Lines 996-1003
subtest 'ModItemFromMarc' => sub {
Link Here
|
996 |
|
996 |
|
997 |
my $updated_item = ModItemFromMarc($updated_item_record, $biblio->biblionumber, $itemnumber); |
997 |
my $updated_item = ModItemFromMarc($updated_item_record, $biblio->biblionumber, $itemnumber); |
998 |
is( $updated_item->{itemlost}, 0, 'itemlost should have been reset to the default value in DB' ); |
998 |
is( $updated_item->{itemlost}, 0, 'itemlost should have been reset to the default value in DB' ); |
999 |
is( $updated_item->{paidfor}, "this is something", "Non mapped field has not been reset" ); |
999 |
is( $updated_item->{new_status}, "this is something", "Non mapped field has not been reset" ); |
1000 |
is( Koha::Items->find($itemnumber)->paidfor, "this is something" ); |
1000 |
is( Koha::Items->find($itemnumber)->new_status, "this is something" ); |
1001 |
|
1001 |
|
1002 |
$schema->storage->txn_rollback; |
1002 |
$schema->storage->txn_rollback; |
1003 |
}; |
1003 |
}; |
1004 |
- |
|
|