Don't refund transactionItems unless the transaction is successful, or if the item is already canceled. Also, no not call onCancelRecurring for normal Sku's unless they're really recurring. Fixes bug #12089.
This commit is contained in:
parent
8f687d8aa5
commit
8525e4b7ee
7 changed files with 173 additions and 5 deletions
|
|
@ -30,7 +30,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
plan tests => 21; # Increment this number for each test you create
|
||||
plan tests => 22; # Increment this number for each test you create
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
|
@ -84,4 +84,13 @@ $item->cart->delete;
|
|||
my $loadSku = WebGUI::Asset::Sku->newBySku($session, $sku->get("sku"));
|
||||
is($loadSku->getId, $sku->getId, "newBySku() works.");
|
||||
|
||||
{
|
||||
##Check to see that calling onRefund does not call onCancelRecurring for a default, non-recurring sku.
|
||||
use Monkey::Patch qw/:all/;
|
||||
my $messageAdded = 0;
|
||||
my $monkey = patch_object $sku => 'onCancelRecurring' => sub { $messageAdded = 1; };
|
||||
$sku->onRefund;
|
||||
ok !$messageAdded, 'onRefund did not call onCancelRecurring';
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue