diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm index d5faccc9d..64b4fcd46 100644 --- a/lib/WebGUI/Shop/Tax.pm +++ b/lib/WebGUI/Shop/Tax.pm @@ -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; } #------------------------------------------------------------------- diff --git a/t/Shop/Tax.t b/t/Shop/Tax.t index 3a62ae8ed..e264462ec 100644 --- a/t/Shop/Tax.t +++ b/t/Shop/Tax.t @@ -31,7 +31,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 62; +my $tests = 64; plan tests => 1 + $tests; #---------------------------------------------------------------------------- @@ -366,6 +366,19 @@ cmp_deeply( 'importTaxData: error handling for file that that cannot be read', ); +####################################################################### +# +# calculate +# +####################################################################### + +eval { $taxer->calculate(); }; +$e = Exception::Class->caught(); +isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate: error handling for not sending a cart'); +is($e->error, 'Must pass in a WebGUI::Shop::Cart object', 'calculate: error handling for not sending a cart'); + +##Build a cart, add some Donation SKUs to it. Set one to be taxable. + } sub _grabTaxData { @@ -378,12 +391,6 @@ sub _grabTaxData { return @taxData; } -####################################################################### -# -# calculate -# -####################################################################### - #---------------------------------------------------------------------------- # Cleanup END {