Add a method to update userProfileData column types.

Fix a bug with making a profileField called userId.
Update POD
Added several profileField tests.
This commit is contained in:
Colin Kuskie 2009-07-22 17:59:58 +00:00
parent 23f7af1d71
commit 0d06c15275
4 changed files with 95 additions and 8 deletions

View file

@ -33,7 +33,7 @@ WebGUI::Test->usersToDelete($newUser);
#----------------------------------------------------------------------------
# Tests
plan tests => 28; # Increment this number for each test you create
plan tests => 37; # Increment this number for each test you create
#----------------------------------------------------------------------------
# Test the creation of ProfileField
@ -124,6 +124,29 @@ is($newProfileField2->getLabel, 'WebGUI', 'getLabel will process safeEval calls
ok( WebGUI::ProfileField->exists($session,"firstName"), "firstName field exists" );
ok( !WebGUI::ProfileField->exists($session, time), "random field does not exist" );
###########################################################
#
# isReservedFieldName
#
###########################################################
ok( WebGUI::ProfileField->isReservedFieldName('func'), 'isReservedFieldName: func');
ok( WebGUI::ProfileField->isReservedFieldName('op'), '... op');
ok( WebGUI::ProfileField->isReservedFieldName('userId'), '... userId');
ok( WebGUI::ProfileField->isReservedFieldName('wg_privacySettings'), '... wg_privacySettings');
ok( !WebGUI::ProfileField->isReservedFieldName('function'), '... function is not');
ok( !WebGUI::ProfileField->isReservedFieldName('operation'), '... operation is no');
ok( !WebGUI::ProfileField->isReservedFieldName('shop'), '... shop is not');
###########################################################
#
# exists
#
###########################################################
ok( WebGUI::ProfileField->exists($session, 'email'), 'exists: email');
ok( !WebGUI::ProfileField->exists($session, 'userId'), '... userId (not)');
#----------------------------------------------------------------------------
# Cleanup
END {