Bug 32464: (follow-up) fix t/db_dependent/Koha/Item.t
Remove useless unit tests with mss arg Test with : prove t/db_dependent/Koha/Filter/EmbedItems.t Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
4cb5f36c2a
commit
657fad8283
1 changed files with 2 additions and 18 deletions
|
@ -362,7 +362,7 @@ subtest "as_marc_field() tests" => sub {
|
|||
my @schema_columns = $schema->resultset('Item')->result_source->columns;
|
||||
my @mapped_columns = grep { exists $mss->{'items.'.$_} } @schema_columns;
|
||||
|
||||
plan tests => 2 * (scalar @mapped_columns + 1) + 4;
|
||||
plan tests => scalar @mapped_columns + 5;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
@ -370,23 +370,7 @@ subtest "as_marc_field() tests" => sub {
|
|||
# Make sure it has at least one undefined attribute
|
||||
$item->set({ replacementprice => undef })->store->discard_changes;
|
||||
|
||||
# Tests with the mss parameter
|
||||
my $marc_field = $item->as_marc_field({ mss => $mss });
|
||||
|
||||
is(
|
||||
$marc_field->tag,
|
||||
$itemtag,
|
||||
'Generated field set the right tag number'
|
||||
);
|
||||
|
||||
foreach my $column ( @mapped_columns ) {
|
||||
my $tagsubfield = $mss->{ 'items.' . $column }[0]->{tagsubfield};
|
||||
is( $marc_field->subfield($tagsubfield),
|
||||
$item->$column, "Value is mapped correctly for column $column" );
|
||||
}
|
||||
|
||||
# Tests without the mss parameter
|
||||
$marc_field = $item->as_marc_field();
|
||||
my $marc_field = $item->as_marc_field;
|
||||
|
||||
is(
|
||||
$marc_field->tag,
|
||||
|
|
Loading…
Reference in a new issue