1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

Fix template test

This commit is contained in:
Jake Barnby 2023-08-28 22:41:48 -04:00
parent 34cb1a2229
commit f43f155224
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -571,24 +571,13 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('password', $response['body']['smtpPassword']);
$this->assertEquals('', $response['body']['smtpSecure']);
/** Reset */
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/smtp', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'enabled' => false,
'sender' => 'mailer@appwrite.io',
'host' => 'maildev',
'port' => 1025,
'username' => 'user',
'password' => 'password',
]);
return $data;
}
/**
* @group smtpAndTemplates
* @depends testUpdateProject */
* @depends testUpdateProjectSMTP
*/
public function testUpdateTemplates($data): array
{
$id = $data['projectId'];
@ -601,11 +590,9 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('Account Verification', $response['body']['subject']);
$this->assertEquals('Project Test 2 Team', $response['body']['senderName']);
$this->assertEquals('team@appwrite.io', $response['body']['senderEmail']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertMatchesRegularExpression('/<!doctype html>/', $response['body']['message']);
/** Update Email template */
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([