From d1f797ff23a4e9fbd35fd0ea0275ff0d64139330 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sun, 25 Feb 2024 19:24:06 +1300 Subject: [PATCH] Fix test --- .../e2e/Services/Account/AccountCustomClientTest.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index d3fc13bd17..3e67d789e8 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -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();