test: Testing team delete removes membership
This commit is contained in:
parent
d113fb2751
commit
f8869efa42
1 changed files with 2 additions and 2 deletions
|
@ -42,20 +42,20 @@ class TeamsCustomServerTest extends Scope
|
||||||
$email = uniqid() . 'friend@localhost.test';
|
$email = uniqid() . 'friend@localhost.test';
|
||||||
$name = 'Friend User';
|
$name = 'Friend User';
|
||||||
$password = 'password';
|
$password = 'password';
|
||||||
|
$userId = ID::unique();
|
||||||
|
|
||||||
// Create a user account before we create a invite so we can check if the user has permissions when it shouldn't
|
// Create a user account before we create a invite so we can check if the user has permissions when it shouldn't
|
||||||
$user = $this->client->call(Client::METHOD_POST, '/account', [
|
$user = $this->client->call(Client::METHOD_POST, '/account', [
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => 'console'
|
'x-appwrite-project' => 'console'
|
||||||
], [
|
], [
|
||||||
'userId' => 'unique()',
|
'userId' => $userId,
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
'password' => $password,
|
'password' => $password,
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
], false);
|
], false);
|
||||||
|
|
||||||
$this->assertEquals(201, $user['headers']['status-code']);
|
$this->assertEquals(201, $user['headers']['status-code']);
|
||||||
$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([
|
||||||
|
|
Loading…
Reference in a new issue