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:
parent
c9726f7b4d
commit
d1ede96e63
2 changed files with 37 additions and 4 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue