Skip to content

Commit 4884f8c

Browse files
committed
1 parent 1b99d91 commit 4884f8c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Parse/ParseUserTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,4 +759,15 @@ public function testRequestVerificationEmailBad()
759759
$this->setExpectedException('Parse\ParseException', 'No user found with email not_a_known_email');
760760
ParseUser::requestVerificationEmail('not_a_known_email');
761761
}
762+
763+
public function testRegisteringAnonymousClearsAuthData()
764+
{
765+
$user = ParseUser::loginWithAnonymous();
766+
$response = ParseClient::_request('GET', 'users', null, null, true);
767+
$this->assertNotNull($response['results'][0]['authData']['anonymous']);
768+
$user->setUsername('Mary');
769+
$user->save();
770+
$response = ParseClient::_request('GET', 'users', null, null, true);
771+
$this->assertArrayNotHasKey('authData', $response['results'][0]) ;
772+
}
762773
}

0 commit comments

Comments
 (0)