From ba0a6f00977eb3cea48ba53f4e0866a2fe3e5c4e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 5 Feb 2025 14:14:03 +0000 Subject: [PATCH] chore: added requires scopes, fix call method --- tests/e2e/Scopes/ProjectCustom.php | 4 +++- tests/e2e/Services/Tokens/TokensCustomServerTest.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 7f84ace6f2..2b4073a1d2 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -95,7 +95,9 @@ trait ProjectCustom 'subscribers.write', 'subscribers.read', 'migrations.write', - 'migrations.read' + 'migrations.read', + 'tokens.read', + 'tokens.write', ], ]); diff --git a/tests/e2e/Services/Tokens/TokensCustomServerTest.php b/tests/e2e/Services/Tokens/TokensCustomServerTest.php index 587fc0f531..47c0600623 100644 --- a/tests/e2e/Services/Tokens/TokensCustomServerTest.php +++ b/tests/e2e/Services/Tokens/TokensCustomServerTest.php @@ -83,7 +83,7 @@ class TokensCustomServerTest extends Scope $tokenId = $data['tokenId']; $expiry = DateTime::now(); - $res = $this->client->call(Client::METHOD_PUT, '/tokens/' . $tokenId, array_merge([ + $res = $this->client->call(Client::METHOD_PATCH, '/tokens/' . $tokenId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [