Debug needs an explicit package name for addToCleanup.
This commit is contained in:
parent
19b6f9de12
commit
82bb59d40e
47 changed files with 99 additions and 99 deletions
|
|
@ -155,7 +155,7 @@ $driver = WebGUI::Shop::ShipDriver::UPS->new($session, {
|
|||
enabled => 1,
|
||||
shipType => 'PARCEL',
|
||||
});
|
||||
addToCleanup($driver);
|
||||
WebGUI::Test->addToCleanup($driver);
|
||||
|
||||
eval { $driver->calculate() };
|
||||
$e = Exception::Class->caught();
|
||||
|
|
@ -218,7 +218,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
my $cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
my $workAddress = $addressBook->addAddress({
|
||||
label => 'work',
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ my $options = {
|
|||
};
|
||||
|
||||
$driver2 = WebGUI::Shop::ShipDriver::USPS->new($session, $options);
|
||||
addToCleanup($driver2);
|
||||
WebGUI::Test->addToCleanup($driver2);
|
||||
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver::USPS');
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver');
|
||||
|
|
@ -153,7 +153,7 @@ my $driver = WebGUI::Shop::ShipDriver::USPS->new($session, {
|
|||
enabled => 1,
|
||||
shipType => 'PARCEL',
|
||||
});
|
||||
addToCleanup($driver);
|
||||
WebGUI::Test->addToCleanup($driver);
|
||||
|
||||
my $e;
|
||||
eval { $driver->calculate() };
|
||||
|
|
@ -183,7 +183,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
$cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
my $workAddress = $addressBook->addAddress({
|
||||
label => 'work',
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ my $options = {
|
|||
};
|
||||
|
||||
$driver2 = WebGUI::Shop::ShipDriver::USPSInternational->new($session, $options);
|
||||
addToCleanup($driver2);
|
||||
WebGUI::Test->addToCleanup($driver2);
|
||||
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver::USPSInternational');
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver');
|
||||
|
|
@ -152,7 +152,7 @@ my $driver = WebGUI::Shop::ShipDriver::USPSInternational->new($session, {
|
|||
label => 'Shipping from Shawshank',
|
||||
enabled => 1,
|
||||
});
|
||||
addToCleanup($driver);
|
||||
WebGUI::Test->addToCleanup($driver);
|
||||
|
||||
my $e;
|
||||
eval { $driver->calculate() };
|
||||
|
|
@ -167,7 +167,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
$cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
my $workAddress = $addressBook->addAddress({
|
||||
label => 'work',
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ my $transaction = WebGUI::Shop::Transaction->new($session,{
|
|||
paymentDriverLabel => 'kkk',
|
||||
taxes => 7,
|
||||
});
|
||||
addToCleanup($transaction);
|
||||
WebGUI::Test->addToCleanup($transaction);
|
||||
|
||||
# objects work
|
||||
isa_ok($transaction, "WebGUI::Shop::Transaction");
|
||||
|
|
@ -243,13 +243,13 @@ my $shopGroup = WebGUI::Group->new($session, 'new');
|
|||
my $shopAdmin = WebGUI::User->create($session);
|
||||
$shopUser->username('shopAdmin');
|
||||
$shopGroup->addUsers([$shopAdmin->getId]);
|
||||
addToCleanup($shopUser, $shopAdmin, $shopGroup);
|
||||
WebGUI::Test->addToCleanup($shopUser, $shopAdmin, $shopGroup);
|
||||
$session->setting->set('shopSaleNotificationGroupId', $shopGroup->getId);
|
||||
$session->user({userId => $shopUser->getId});
|
||||
|
||||
my $trans = WebGUI::Shop::Transaction->new($session, {});
|
||||
ok($trans->can('sendNotifications'), 'sendNotifications: valid method for transactions');
|
||||
addToCleanup($trans);
|
||||
WebGUI::Test->addToCleanup($trans);
|
||||
|
||||
##Disable sending email
|
||||
my $sendmock = Test::MockObject->new( {} );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue