user-services
This commit is contained in:
parent
18e095faee
commit
1f96d708bf
5 changed files with 18 additions and 180 deletions
8
t/User.t
8
t/User.t
|
|
@ -20,7 +20,7 @@ use WebGUI::Cache;
|
|||
use WebGUI::User;
|
||||
use WebGUI::ProfileField;
|
||||
|
||||
use Test::More tests => 221; # increment this value for each test you create
|
||||
use Test::More tests => 211; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
use Data::Dumper;
|
||||
|
||||
|
|
@ -115,18 +115,12 @@ $newSession->close;
|
|||
|
||||
my $now = time;
|
||||
$user->update({
|
||||
userId => 'INEDU2COMEINSATURDYTHX',
|
||||
username => "jlumbe",
|
||||
firstName => "John",
|
||||
lastName => "Lumbergh",
|
||||
lastUpdated => $now,
|
||||
});
|
||||
|
||||
isnt(
|
||||
$user->get('userId'), 'INEDU2COMEINSATURDYTHX',
|
||||
"update() does not allow changing userId",
|
||||
);
|
||||
|
||||
is(
|
||||
$session->db->quickScalar("SELECT username FROM users WHERE userId=?",[$user->getId]),
|
||||
"jlumbe",
|
||||
|
|
|
|||
|
|
@ -231,10 +231,7 @@ all form variables.
|
|||
sub body {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
if ( !defined $value ) {
|
||||
return keys %{ $self->{body} } if wantarray;
|
||||
return { %{ $self->{body} } };
|
||||
}
|
||||
return keys %{ $self->{body} } unless defined $value;
|
||||
if ($self->{body}->{$value}) {
|
||||
if (wantarray && ref $self->{body}->{$value} eq "ARRAY") {
|
||||
return @{$self->{body}->{$value}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue