use BSE::TB::ProductOptionValues;
use BSE::TB::PriceTiers;
-our $VERSION = "1.004";
+our $VERSION = "1.005";
=head1 NAME
}
}
- my %prices;
+ my %prices = map { $_->tier_id => $_->retailPrice } $leaf->prices;
for my $tier_id (keys %{$self->{price_tiers}}) {
my $price = $entry{"tier_price_$tier_id"};
if (defined $price && $price =~ /\d/) {
or plan skip_all => "Text::CSV not available";
}
-plan tests => 8;
+plan tests => 11;
BEGIN {
unshift @INC, File::Spec->catdir(BSE::Test::base_dir(), "cgi-bin", "modules");
product_code => "C$when",
);
+ $testa->set_prices({ 1 => 400 });
+
{
my $fh = File::Temp->new;
my $filename = $fh->filename;
is_deeply([ $imp->leaves ], [], "should be no updated articles");
}
+ SKIP:
+ {
+ my @prices = $testa->prices;
+ is(@prices, 1, "should still be a tier price")
+ or skip "No prices found", 2;
+ is($prices[0]->tier_id, 1, "check tier id");
+ is($prices[0]->retailPrice, 400, "check tier price");
+ }
+
END {
$testa->remove($cfg) if $testa;
}