add a input validation check and test for Tax->calculate
This commit is contained in:
parent
9d377193d3
commit
5946fd5476
2 changed files with 15 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue