change test validations from strings to datetime
This commit is contained in:
parent
7ab26e5b0d
commit
76b65c5dea
|
@ -824,7 +824,7 @@ App::post('/v1/projects/:projectId/keys')
|
|||
->param('expire', null, new DateTimeValidation(), 'Expiration time in DateTime. Use null for unlimited expiration.', true)
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
->action(function (string $projectId, string $name, array $scopes, string|null $expire, Response $response, Database $dbForConsole) {
|
||||
->action(function (string $projectId, string $name, array $scopes, ?string $expire, Response $response, Database $dbForConsole) {
|
||||
|
||||
$project = $dbForConsole->getDocument('projects', $projectId);
|
||||
|
||||
|
@ -934,7 +934,7 @@ App::put('/v1/projects/:projectId/keys/:keyId')
|
|||
->param('expire', null, new DatetimeValidation(), 'Expiration time in DateTime. Use null for unlimited expiration.', true)
|
||||
->inject('response')
|
||||
->inject('dbForConsole')
|
||||
->action(function (string $projectId, string $keyId, string $name, array $scopes, string|null $expire, Response $response, Database $dbForConsole) {
|
||||
->action(function (string $projectId, string $keyId, string $name, array $scopes, ?string $expire, Response $response, Database $dbForConsole) {
|
||||
|
||||
$project = $dbForConsole->getDocument('projects', $projectId);
|
||||
|
||||
|
|
|
@ -861,7 +861,7 @@ trait WebhooksBase
|
|||
$this->assertNotEmpty($webhook['data']['userId']);
|
||||
$this->assertNotEmpty($webhook['data']['teamId']);
|
||||
$this->assertCount(2, $webhook['data']['roles']);
|
||||
$this->assertEquals(true, DateTime::isValid($webhook['data']['joined']));
|
||||
$this->assertEquals(false, DateTime::isValid($webhook['data']['joined']));
|
||||
$this->assertEquals(true, DateTime::isValid($webhook['data']['invited']));
|
||||
$this->assertEquals(('server' === $this->getSide()), $webhook['data']['confirm']);
|
||||
|
||||
|
|
Loading…
Reference in a new issue