mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Implemented account deletion. Not all cases covered with tests [skip ci]
This commit is contained in:
@@ -58,6 +58,13 @@ class UsernameToUuidCest {
|
||||
$I->canSeeResponseEquals('');
|
||||
}
|
||||
|
||||
public function getUuidForDeletedAccount(FunctionalTester $I) {
|
||||
$I->wantTo('get uuid for account that marked for deleting');
|
||||
$this->route->usernameToUuid('DeletedAccount');
|
||||
$I->canSeeResponseCodeIs(204);
|
||||
$I->canSeeResponseEquals('');
|
||||
}
|
||||
|
||||
public function nonPassedUsername(FunctionalTester $I) {
|
||||
$I->wantTo('get 404 on not passed username');
|
||||
$this->route->usernameToUuid('');
|
||||
|
@@ -42,7 +42,7 @@ class UsernamesToUuidsCest {
|
||||
|
||||
public function getUuidsByPartialNonexistentUsernames(FunctionalTester $I) {
|
||||
$I->wantTo('get uuids by few usernames and some nonexistent');
|
||||
$this->route->uuidsByUsernames(['Admin', 'not-exists-user']);
|
||||
$this->route->uuidsByUsernames(['Admin', 'DeletedAccount', 'not-exists-user']);
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
@@ -51,6 +51,8 @@ class UsernamesToUuidsCest {
|
||||
'name' => 'Admin',
|
||||
],
|
||||
]);
|
||||
$I->cantSeeResponseJsonMatchesJsonPath('$.[?(@.name="DeletedAccount")]');
|
||||
$I->cantSeeResponseJsonMatchesJsonPath('$.[?(@.name="not-exists-user")]');
|
||||
}
|
||||
|
||||
public function passAllNonexistentUsernames(FunctionalTester $I) {
|
||||
|
@@ -55,6 +55,13 @@ class UuidToUsernamesHistoryCest {
|
||||
$I->canSeeResponseEquals('');
|
||||
}
|
||||
|
||||
public function passUuidOfDeletedAccount(FunctionalTester $I) {
|
||||
$I->wantTo('get username by passing uuid of the account marked for deleting');
|
||||
$this->route->usernamesByUuid('6383de63-8f85-4ed5-92b7-5401a1fa68cd');
|
||||
$I->canSeeResponseCodeIs(204);
|
||||
$I->canSeeResponseEquals('');
|
||||
}
|
||||
|
||||
public function passWrongUuidFormat(FunctionalTester $I) {
|
||||
$I->wantTo('call profile route with invalid uuid string');
|
||||
$this->route->usernamesByUuid('bla-bla-bla');
|
||||
|
Reference in New Issue
Block a user