Fix template test
This commit is contained in:
parent
34cb1a2229
commit
f43f155224
1 changed files with 2 additions and 15 deletions
|
@ -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([
|
||||
|
|
Loading…
Reference in a new issue