Added extras to user profile fields. This field can be accessed using the

profile.form.element.extras template variable when editing a profile and the
profile.extras field when viewing a template.
This commit is contained in:
Chris Nehren 2008-10-22 00:20:31 +00:00
parent ddd1c27305
commit ebd2309104
8 changed files with 337 additions and 271 deletions

View file

@ -20,7 +20,7 @@ use WebGUI::Cache;
use WebGUI::User;
use WebGUI::ProfileField;
use Test::More tests => 139; # increment this value for each test you create
use Test::More tests => 140; # increment this value for each test you create
use Test::Deep;
my $session = WebGUI::Test->session;
@ -406,6 +406,12 @@ $profileField->set(\%copiedFieldData);
is($profileField->get('dataDefault'), "'America/Hillsboro'", 'default timeZone set to America/Hillsboro');
# now let's make sure it has an extras field, and that we can get/set it.
$profileField->set( { extras => '<!-- hello world -->' } );
is($profileField->getExtras, '<!-- hello world -->', 'extras field for profileField');
$profileField->set( { extras => '' } );
my $busterCopy = WebGUI::User->new($session, $buster->userId);
is( $busterCopy->profileField('timeZone'), 'America/Hillsboro', 'busterCopy received updated user profile because there is no username set in his cached user object');