- my $mungemarcprice=MungeMarcPrice($price->{'string'});
- my $expected=$price->{'expected'};
- ok ($mungemarcprice eq $expected, "must return $price->{'expected'} from initial string : $price->{'string'}");
+ is(
+ MungeMarcPrice($price->{'string'}),
+ $price->{'expected'},
+ "got expected price from $price->{'string'} (using currency.isocode)",
+ );
+}
+
+# run tests again, but fall back to currency name
+$dbh->do('DELETE FROM aqbasket');
+$dbh->do('DELETE FROM currency');
+$dbh->do("INSERT INTO currency ( currency, symbol, rate, active )
+ VALUES ('$ISOCODE', '$SYMBOL', '$RATE', 1)");
+
+foreach my $price (@prices2test) {
+ is(
+ MungeMarcPrice($price->{'string'}),
+ $price->{'expected'},
+ "got expected price from $price->{'string'} (using ISO code as currency name)",
+ );