mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-29 23:39:35 -05:00
check email in the search sharee request (#8861)
This commit is contained in:
@@ -2624,4 +2624,27 @@ class GraphContext implements Context {
|
||||
$this->featureContext->getJSONSchema($schemaString)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the JSON data of the search response should not contain user(s) email
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theJsonDataResponseShouldNotContainUserEmail(): void {
|
||||
$responseBody = $this->featureContext->getJsonDecodedResponseBodyContent()->value;
|
||||
$mailValueExist = false;
|
||||
$email = "";
|
||||
foreach ($responseBody as $value) {
|
||||
if (isset($value->mail)) {
|
||||
$mailValueExist = true;
|
||||
$email = $value->mail;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Assert::assertFalse(
|
||||
$mailValueExist,
|
||||
"Response contains email '$email' but should not."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user