feat: fix tests
This commit is contained in:
parent
6ab1095280
commit
7735b67a3f
|
@ -334,16 +334,16 @@ class FunctionsV1 extends Worker
|
|||
->setParam('projectId', $projectId)
|
||||
->setParam('userId', $userId)
|
||||
->setParam('webhooks', $webhooks)
|
||||
->setParam('event', 'functions.executions.update')
|
||||
->setParam('event', $event)
|
||||
->setParam('eventData', $execution->getArrayCopy(array_keys($executionModel->getRules())));
|
||||
$executionUpdate->trigger();
|
||||
|
||||
/** Trigger realtime event */
|
||||
$target = Realtime::fromPayload('functions.executions.update', $execution);
|
||||
$target = Realtime::fromPayload($event, $execution);
|
||||
Realtime::send(
|
||||
projectId: $projectId,
|
||||
payload: $execution->getArrayCopy(),
|
||||
event: 'functions.executions.update',
|
||||
event: $event,
|
||||
channels: $target['channels'],
|
||||
roles: $target['roles']
|
||||
);
|
||||
|
|
|
@ -476,7 +476,7 @@ class WebhooksCustomServerTest extends Scope
|
|||
$execution = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), ['executionId' => 'unique()',]);
|
||||
], $this->getHeaders()), []);
|
||||
|
||||
$this->assertEquals($execution['headers']['status-code'], 201);
|
||||
$this->assertNotEmpty($execution['body']['$id']);
|
||||
|
|
Loading…
Reference in a new issue