test: fix create custom session params
This commit is contained in:
parent
9206390d01
commit
c39426745c
|
@ -2160,12 +2160,14 @@ class AccountCustomClientTest extends Scope
|
|||
* @depends testGetAccountSessions
|
||||
* @depends testGetAccountLogs
|
||||
*/
|
||||
public function testUpdateUniversalToken(array $data): array
|
||||
public function testUpdateCustomSession(array $data): array
|
||||
{
|
||||
$response = $this->client->call(Client::METHOD_POST, '/users/' . $data['id'] . '/tokens', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey'],
|
||||
], [
|
||||
'expire' => 60
|
||||
]);
|
||||
|
||||
$userId = $response['body']['userId'];
|
||||
|
|
|
@ -232,14 +232,16 @@ trait UsersBase
|
|||
/**
|
||||
* @depends testCreateUser
|
||||
*/
|
||||
public function testCreateUniversalToken(array $data): void
|
||||
public function testCreateCustomSession(array $data): void
|
||||
{
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
*/
|
||||
$token = $this->client->call(Client::METHOD_POST, '/users/' . $data['userId'] . '/tokens', array_merge([
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()));
|
||||
], $this->getHeaders()), [
|
||||
'expire' => 60,
|
||||
]);
|
||||
|
||||
$this->assertEquals(201, $token['headers']['status-code']);
|
||||
$this->assertEquals($data['userId'], $token['body']['userId']);
|
||||
|
|
Loading…
Reference in a new issue