add a input validation check and test for Tax->calculate

This commit is contained in:
Colin Kuskie 2008-03-01 21:22:53 +00:00
parent 9d377193d3
commit 5946fd5476
2 changed files with 15 additions and 9 deletions

View file

@ -87,10 +87,9 @@ Calculate the tax for the contents of the cart.
sub calculate {
my $self = shift;
my $cart = shift;
WebGUI::Error::InvalidParam->throw(error => 'Must pass in a WebGUI::Shop::Cart object')
unless ref($cart) eq 'WebGUI::Shop::Cart';
return $id;
return;
}
#-------------------------------------------------------------------