1
0
Fork 0
mirror of synced 2024-10-05 12:43:13 +13: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 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;
} }