This commit is contained in:
Jake Barnby 2024-02-25 19:24:06 +13:00
parent a178dbfc4b
commit d1f797ff23
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -74,7 +74,9 @@ class AccountCustomClientTest extends Scope
$this->assertEmpty($response['body']['secret']);
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['expire']));
// already logged in
/**
* Test for FAILURE
*/
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
@ -85,11 +87,8 @@ class AccountCustomClientTest extends Scope
'password' => $password,
]);
$this->assertEquals(201, $response['headers']['status-code']);
$this->assertEquals(401, $response['headers']['status-code']);
/**
* Test for FAILURE
*/
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
@ -2247,7 +2246,7 @@ class AccountCustomClientTest extends Scope
$this->assertEmpty($response['body']['secret']);
$this->assertEquals(true, (new DatetimeValidator())->isValid($response['body']['expire']));
\sleep(10);
\sleep(15);
$smsRequest = $this->getLastRequest();