More tests for bug fix #11009.

Abstract out making a session in WebGUI::Test.  Update POD
in Shop/Address.  Add tests for newBySession, showing that
the previous commit that allows update to update addressBookId
actually fixed the bug in question.
This commit is contained in:
Colin Kuskie 2009-09-21 19:44:43 -07:00
parent f2e8d6a70b
commit 323edd888e
5 changed files with 79 additions and 42 deletions

View file

@ -24,7 +24,8 @@ Package WebGUI::Shop::Address
=head1 DESCRIPTION
An address is used to track shipping or payment addresses in the commerce system.
An address is used to track shipping or payment addresses in the commerce system. Because of
object caching in the AddressBook, addresses should never, ever be accessed directly.
=head1 SYNOPSIS

View file

@ -85,7 +85,9 @@ Deletes this address book and all addresses contained in it.
sub delete {
my ($self) = @_;
my $myId = id $self;
foreach my $address (@{$self->getAddresses}) {
delete $addressCache{$myId}{$address->getId};
$address->delete;
}
$self->session->db->write("delete from addressBook where addressBookId=?",[$self->getId]);