diff --git a/t/User.t b/t/User.t index 4ea9b06bb..02195b210 100644 --- a/t/User.t +++ b/t/User.t @@ -20,7 +20,7 @@ use WebGUI::Cache; use WebGUI::User; use WebGUI::ProfileField; -use Test::More tests => 147; # increment this value for each test you create +use Test::More tests => 149; # increment this value for each test you create use Test::Deep; my $session = WebGUI::Test->session; @@ -672,6 +672,17 @@ is( 'getProfileUrl: uses session->url->page if no URL is passed in' ); +################################################################ +# +# hasFriends +# +################################################################ + +ok(! $neighbor->hasFriends, 'hasFriends, user has no friends'); +$friend->addToGroups([$neighbor->friends->getId]); +ok( $neighbor->hasFriends, 'hasFriends, user has a friend'); +$friend->deleteFromGroups([$neighbor->friends->getId]); + END { foreach my $account ($user, $dude, $buster, $buster3, $neighbor, $friend, $newFish, $newCreateUser) { (defined $account and ref $account eq 'WebGUI::User') and $account->delete;