mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-23 22:29:59 -05:00
do not save edited users
This commit is contained in:
committed by
Ralf Haferkamp
parent
681ed49dc4
commit
0399398bc8
@@ -107,10 +107,6 @@ class GraphContext implements Context {
|
||||
): void {
|
||||
$response = $this->editUserUsingTheGraphApi($byUser, $user, $userName);
|
||||
$this->featureContext->setResponse($response);
|
||||
// need to add user to list to delete him after test
|
||||
if (!empty($userName) && $this->featureContext->getAttributeOfCreatedUser($userName, 'id')) {
|
||||
$this->featureContext->addUserToCreatedUsersList($userName, $this->featureContext->getUserPassword($user));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -287,9 +283,12 @@ class GraphContext implements Context {
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function adminDeletesUserUsingTheGraphApi(string $user, ?string $byUser = null): ResponseInterface {
|
||||
public function adminDeletesUserUsingTheGraphApi(string $user, ?string $byUser = null): ?ResponseInterface {
|
||||
$credentials = $this->getAdminOrUserCredentials($byUser);
|
||||
$userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
if ($userId === null) {
|
||||
throw new \RuntimeException("Cannot delete user '$user': no userId found");
|
||||
}
|
||||
return GraphHelper::deleteUserByUserId(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
|
||||
@@ -74,7 +74,7 @@ Feature: edit user
|
||||
And the user "Alice" has deleted a user "sam"
|
||||
When the user "Alice" changes the user name of user "Brian" to "sam" using the Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the user information of "sam" should match this JSON schema
|
||||
And the user information of "Brian" should match this JSON schema
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user