1
0
Fork 0
mirror of synced 2024-10-02 02:07:04 +13:00

test: account already logged in

This commit is contained in:
loks0n 2023-12-13 11:01:08 +00:00
parent 3d4701abf4
commit bdcb4c785e

View file

@ -73,10 +73,7 @@ class AccountCustomClientTest extends Scope
$this->assertEmpty($response['body']['secret']);
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['expire']));
/**
* Test for FAILURE
*/
// Test already logged in
// already logged in
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
@ -87,8 +84,11 @@ class AccountCustomClientTest extends Scope
'password' => $password,
]);
$this->assertEquals(401, $response['headers']['status-code']);
$this->assertEquals(201, $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',