This set of tests brings overall coverage close to 100% for the Ad module.

Remainnig conditionals in the set subroutine will be tested after 7.4
comes our and ->get can be modified to return the whole set of properties.
Fixed a bug in the Ad module where the priority could not be set to 0.
This commit is contained in:
Colin Kuskie 2007-02-19 04:01:24 +00:00
parent 859886e8f8
commit 9666dadc82
2 changed files with 20 additions and 4 deletions

View file

@ -253,7 +253,7 @@ sub set {
$self->{_properties}{borderColor} = $properties->{borderColor} || $self->{_properties}{borderColor} || "#000000";
$self->{_properties}{textColor} = $properties->{textColor} || $self->{_properties}{textColor} || "#000000";
$self->{_properties}{backgroundColor} = $properties->{backgroundColor} || $self->{_properties}{backgroundColor} || "#ffffff";
$self->{_properties}{priority} = $properties->{priority} || $self->{_properties}{priority} || "0";
$self->{_properties}{priority} = exists $properties->{priority} ? $properties->{priority} : $self->{_properties}{priority};
# prerender the ad for faster display
my $adSpace = WebGUI::AdSpace->new($self->session, $self->get("adSpaceId"));
if ($self->get("type") eq "text") {