test: Testing team delete removes membership
This commit is contained in:
parent
93d4efbc0e
commit
d113fb2751
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,7 @@ class TeamsCustomServerTest extends Scope
|
||||||
], false);
|
], false);
|
||||||
|
|
||||||
$this->assertEquals(201, $user['headers']['status-code']);
|
$this->assertEquals(201, $user['headers']['status-code']);
|
||||||
$userId = json_decode($user['body'], true)['$id'];
|
$userId = $user['body']['$id'];
|
||||||
|
|
||||||
/* 3. Add membership to user. */
|
/* 3. Add membership to user. */
|
||||||
$response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([
|
$response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([
|
||||||
|
@ -76,6 +76,7 @@ class TeamsCustomServerTest extends Scope
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
'x-appwrite-key' => $this->getProject()['apiKey'],
|
'x-appwrite-key' => $this->getProject()['apiKey'],
|
||||||
], $this->getHeaders()));
|
], $this->getHeaders()));
|
||||||
|
|
||||||
$this->assertEquals(200, $response['headers']['status-code']);
|
$this->assertEquals(200, $response['headers']['status-code']);
|
||||||
$this->assertEquals($teamUid, $response['body']['memberships'][0]['teamId']);
|
$this->assertEquals($teamUid, $response['body']['memberships'][0]['teamId']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue