1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +12:00

Updated tests

This commit is contained in:
Eldad Fux 2023-12-19 22:39:40 +01:00
parent 171d46b091
commit d8d9976aa1

View file

@ -584,15 +584,21 @@ class ProjectsConsoleClientTest extends Scope
public function testCreateProjectSMTPTests($data): array
{
$id = $data['projectId'];
$email = 'mailer@appwrite.io';
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp/tests', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'email' => 'mailer@appwrite.io',
'email' => $email,
]);
$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;
}