$dbh->{RaiseError} = 1;
# Mocking variables
-my $context = new Test::MockModule('C4::Context');
+my $context = new Test::MockModule('C4::Context');
mock_marcfromkohafield();
is( $isbns->[$i], $more_isbns[$i],
"(GetMarcISBN) Corretly retrieves ISBN #". ($i + 1));
}
-
+ is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100,
+ "GetMarcPrice returns the correct value");
}
sub mock_marcfromkohafield {
my $field = MARC::Field->new( $isbn_field,'','','a' => $isbn);
# Add the price subfield
my $price_subfield = ( $marcflavour eq 'UNIMARC' ) ? 'd' : 'c' ;
- $field->add_subfields( $price_subfield => '100' );
+ $field->add_subfields( $price_subfield => '$100' );
return $field;
}
}
subtest 'MARC21' => sub {
- plan tests => 25;
+ plan tests => 26;
run_tests('MARC21');
$dbh->rollback;
};
subtest 'UNIMARC' => sub {
- plan tests => 25;
+ plan tests => 26;
run_tests('UNIMARC');
$dbh->rollback;
};
subtest 'NORMARC' => sub {
- plan tests => 25;
+ plan tests => 26;
run_tests('NORMARC');
$dbh->rollback;
};