changed the name of getCartBySession to newBySession

created the CartItemCount and MiniCart macros
added help for MinCart, Cart, Address Book, and Edit Address templates
This commit is contained in:
JT Smith 2008-05-24 23:27:30 +00:00
parent e3061a1606
commit 57c85fde5a
18 changed files with 895 additions and 43 deletions

View file

@ -37,7 +37,7 @@ plan tests => 20; # Increment this number for each test you create
#----------------------------------------------------------------------------
# put your tests here
throws_deeply ( sub { my $cart = WebGUI::Shop::Cart->getCartBySession(); },
throws_deeply ( sub { my $cart = WebGUI::Shop::Cart->newBySession(); },
'WebGUI::Error::InvalidObject',
{
error => 'Need a session.',
@ -47,7 +47,7 @@ throws_deeply ( sub { my $cart = WebGUI::Shop::Cart->getCartBySession(); },
'newBySession takes an exception to not giving it a session variable'
);
my $cart = WebGUI::Shop::Cart->getCartBySession($session);
my $cart = WebGUI::Shop::Cart->newBySession($session);
isa_ok($cart, "WebGUI::Shop::Cart");
isa_ok($cart->session, "WebGUI::Session");

View file

@ -540,7 +540,7 @@ SKIP: {
##Build a cart, add some Donation SKUs to it. Set one to be taxable.
my $cart = WebGUI::Shop::Cart->getCartBySession($session);
my $cart = WebGUI::Shop::Cart->newBySession($session);
is($taxer->calculate($cart), 0, 'calculate returns 0 if there is no shippingAddressId in the cart');