Updated tests
This commit is contained in:
parent
171d46b091
commit
d8d9976aa1
1 changed files with 7 additions and 1 deletions
|
@ -584,15 +584,21 @@ class ProjectsConsoleClientTest extends Scope
|
||||||
public function testCreateProjectSMTPTests($data): array
|
public function testCreateProjectSMTPTests($data): array
|
||||||
{
|
{
|
||||||
$id = $data['projectId'];
|
$id = $data['projectId'];
|
||||||
|
$email = 'mailer@appwrite.io';
|
||||||
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp/tests', array_merge([
|
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp/tests', array_merge([
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
], $this->getHeaders()), [
|
], $this->getHeaders()), [
|
||||||
'email' => 'mailer@appwrite.io',
|
'email' => $email,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals(204, $response['headers']['status-code']);
|
$this->assertEquals(204, $response['headers']['status-code']);
|
||||||
|
|
||||||
|
$lastEmail = $this->getLastEmail();
|
||||||
|
|
||||||
|
$this->assertEquals($email, $lastEmail['to'][0]['address']);
|
||||||
|
$this->assertEquals('SMTP test email from Appwrite', $lastEmail['subject']);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue