test: account already logged in
This commit is contained in:
parent
3d4701abf4
commit
bdcb4c785e
1 changed files with 5 additions and 5 deletions
|
@ -73,10 +73,7 @@ class AccountCustomClientTest extends Scope
|
||||||
$this->assertEmpty($response['body']['secret']);
|
$this->assertEmpty($response['body']['secret']);
|
||||||
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['expire']));
|
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['expire']));
|
||||||
|
|
||||||
/**
|
// already logged in
|
||||||
* Test for FAILURE
|
|
||||||
*/
|
|
||||||
// Test already logged in
|
|
||||||
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
|
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
|
||||||
'origin' => 'http://localhost',
|
'origin' => 'http://localhost',
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
|
@ -87,8 +84,11 @@ class AccountCustomClientTest extends Scope
|
||||||
'password' => $password,
|
'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([
|
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
|
||||||
'origin' => 'http://localhost',
|
'origin' => 'http://localhost',
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
|
|
Loading…
Reference in a new issue