Upgrade to use new permissiosn validator features

This commit is contained in:
Matej Bačo
2022-07-10 17:25:27 +00:00
parent 4016a37573
commit aae7ec6146
7 changed files with 60 additions and 28 deletions
@@ -37,6 +37,18 @@ class FunctionsConsoleClientTest extends Scope
$this->assertEquals(201, $function['headers']['status-code']);
$response = $this->client->call(Client::METHOD_POST, '/functions', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'functionId' => 'unique()',
'name' => 'Test Failure',
'execute' => ['some-random-string'],
'runtime' => 'php-8.0'
]);
$this->assertEquals(400, $response['headers']['status-code']);
return [
'functionId' => $function['body']['$id']
];