fixing bugs reported by tests

This commit is contained in:
JT Smith 2007-07-29 21:26:35 +00:00
parent e07b63476c
commit 40a4c3c487
5 changed files with 9 additions and 6 deletions

View file

@ -2067,7 +2067,7 @@ sub update {
next unless (exists $properties->{$property} || exists $definition->{properties}{$property}{defaultValue});
# skip a property if it has the display only flag set
next if ($properties->{property}{displayOnly});
next if ($definition->{properties}{$property}{displayOnly});
# use the update value
my $value = $properties->{$property};

View file

@ -189,6 +189,7 @@ sub errorCode {
}
#-------------------------------------------------------------------
=head2 label ( )
Returns the label for the commerce plugin.

View file

@ -245,10 +245,10 @@ is(scalar @snippets, $folder->getChildCount, 'changing lineage does not change
is(1 , $folder2->getChildCount, 'changing lineage does not change relationship in folder2');
##Reinstance the asset object due to db manipulation
$folder = WebGUI::Asset->newByUrl($session, $folder->get('url'));
$folder2 = WebGUI::Asset->newByUrl($session, $folder2->get('url'));
@snippets = map { WebGUI::Asset->newByUrl($session, "snippet$_") } 0..6;
$snippet2 = WebGUI::Asset->newByUrl($session, $snippet2->get('url'));
$folder = WebGUI::Asset->newByDynamicClass($session, $folder->getId);
$folder2 = WebGUI::Asset->newByDynamicClass($session, $folder2->getId);
@snippets = map { WebGUI::Asset->newByDynamicClass($session, $snippets[$_]->getId) } 0..6;
$snippet2 = WebGUI::Asset->newByDynamicClass($session, $snippet2->getId);
####################################################
#

View file

@ -37,6 +37,8 @@ my $properties = {
};
$snippet->update($properties);
use Data::Dumper;
Dumper($properties);
foreach my $property (keys %{$properties}) {
is ($snippet->get($property), $properties->{$property}, "updated $property is ".$properties->{$property});
}

View file

@ -40,7 +40,7 @@ $numTests = scalar @formTypes + 1;
plan tests => $numTests;
my @notEnabled = qw/Asset Button Captcha Checkbox Color Control List MimeType SubscriptionGroup Slider Submit User/;
my @notEnabled = qw/Asset Button Captcha Checkbox Color Control List MimeType SubscriptionGroup Slider Submit User Attachments/;
foreach my $formType (@formTypes) {
my $form = WebGUI::Form::DynamicField->new($session, fieldType => $formType);