From d113fb275106114e9b016b39eaf5648c9797b42f Mon Sep 17 00:00:00 2001 From: Binyamin Yawitz <316103+byawitz@users.noreply.github.com> Date: Wed, 26 Jun 2024 13:17:08 -0400 Subject: [PATCH] test: Testing team delete removes membership --- tests/e2e/Services/Teams/TeamsCustomServerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Teams/TeamsCustomServerTest.php b/tests/e2e/Services/Teams/TeamsCustomServerTest.php index d54ac7a4b1..33aeb1b06c 100644 --- a/tests/e2e/Services/Teams/TeamsCustomServerTest.php +++ b/tests/e2e/Services/Teams/TeamsCustomServerTest.php @@ -55,7 +55,7 @@ class TeamsCustomServerTest extends Scope ], false); $this->assertEquals(201, $user['headers']['status-code']); - $userId = json_decode($user['body'], true)['$id']; + $userId = $user['body']['$id']; /* 3. Add membership to user. */ $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-key' => $this->getProject()['apiKey'], ], $this->getHeaders())); + $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals($teamUid, $response['body']['memberships'][0]['teamId']);