Fixed Tax.t tests. The file that contains them should be renamed to TaxDriver/Generic.t. Will do so when I add the tests for the other taxing
components.
This commit is contained in:
parent
b66f47df01
commit
fea09cb7bd
2 changed files with 43 additions and 38 deletions
|
|
@ -108,15 +108,15 @@ sub getTaxRate {
|
|||
my $sku = shift;
|
||||
my $address = shift;
|
||||
my $session = $self->session;
|
||||
my $config = $sku->getTaxConfiguration( $self->className );
|
||||
|
||||
# Check params
|
||||
WebGUI::Error::InvalidParam->throw(error => 'Must pass in a WebGUI::Asset::Sku object')
|
||||
unless $sku->isa( 'WebGUI::Asset::Sku' );
|
||||
unless $sku && $sku->isa( 'WebGUI::Asset::Sku' );
|
||||
WebGUI::Error::InvalidParam->throw(error => 'Must pass in a WebGUI::Shop::Address object')
|
||||
if $address && !$address->isa( 'WebGUI::Shop::Address' );
|
||||
|
||||
|
||||
# Check if the sku has a tax rate override, and return that if it has.
|
||||
my $config = $sku->getTaxConfiguration( $self->className );
|
||||
if ( $config->{ overrideTaxRate } ) {
|
||||
return $config->{ taxRateOverride };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue