coverage tests for identifier method
This commit is contained in:
parent
a915b15cd7
commit
2165538936
1 changed files with 11 additions and 1 deletions
12
t/User.t
12
t/User.t
|
|
@ -20,7 +20,7 @@ use WebGUI::Cache;
|
|||
use WebGUI::User;
|
||||
use WebGUI::ProfileField;
|
||||
|
||||
use Test::More tests => 121; # increment this value for each test you create
|
||||
use Test::More tests => 124; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
|
@ -523,6 +523,16 @@ $session->db->write('update userSession set lastPageView=?',[time-601]);
|
|||
is ($neighbor->isOnline, 0, 'neighbor is not onLine (lastPageViews=601)');
|
||||
$session->user({userId => 1});
|
||||
|
||||
################################################################
|
||||
#
|
||||
# identifier
|
||||
#
|
||||
################################################################
|
||||
|
||||
is($neighbor->identifier, undef, 'identifier: by default, new users have an undefined password with created through the API');
|
||||
is($neighbor->identifier('neighborhood'), 'neighborhood', 'identifier: setting the identifier returns the new identifier');
|
||||
is($neighbor->identifier, 'neighborhood', 'identifier: testing fetch of newly set password');
|
||||
|
||||
END {
|
||||
foreach my $account ($user, $dude, $buster, $buster3, $neighbor, $friend) {
|
||||
(defined $account and ref $account eq 'WebGUI::User') and $account->delete;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue