Make AdSpace->get provide a hash ref if none is supplied.

Add tests to improve test coverage and to verify defaults from the
DB and the code.
This commit is contained in:
Colin Kuskie 2007-02-05 04:10:15 +00:00
parent c9726f7b4d
commit d1ede96e63
2 changed files with 37 additions and 4 deletions

View file

@ -328,7 +328,7 @@ The height, in pixels, of this ad space.
sub set {
my $self = shift;
my $properties = shift;
my $properties = shift || {};
##create requires a name, default will never be used
$self->{_properties}{name} = $properties->{name} || $self->{_properties}{name} || "Unnamed";
$self->{_properties}{title} = $properties->{title} || $self->{_properties}{title} || "Untitled";