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:
parent
f2e8d6a70b
commit
323edd888e
5 changed files with 79 additions and 42 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue