mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Add test for endpoint
This commit is contained in:
parent
de114e61cd
commit
af94fc7882
1 changed files with 14 additions and 0 deletions
|
|
@ -2097,4 +2097,18 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertEquals(204, $response['headers']['status-code']);
|
||||
}
|
||||
|
||||
public function testGetFunctionTemplates()
|
||||
{
|
||||
$templates = $this->client->call(Client::METHOD_GET, '/functions/templates', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey'],
|
||||
], $this->getHeaders()));
|
||||
|
||||
$this->assertEquals(200, $templates['headers']['status-code']);
|
||||
$this->assertGreaterThan(0, $templates['body']['total']);
|
||||
$this->assertIsArray($templates['body']['templates']);
|
||||
$this->assertArrayHasKey('runtimes', $templates['body']['templates'][0]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue