From c97dcbf9c9c4a7ab43d2526f2e558cbf4a7f5e9c Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 10 May 2021 09:55:52 +0530 Subject: [PATCH] feat: fix tests and update changelog --- CHANGES.md | 3 ++- tests/e2e/Services/Teams/TeamsBaseClient.php | 2 +- tests/e2e/Services/Webhooks/WebhooksBase.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b8867b0e5..89f460919 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -38,8 +38,9 @@ - Function execution environment variable `APPWRITE_FUNCTION_EVENT_PAYLOAD` renamed to `APPWRITE_FUNCTION_EVENT_DATA` (#1045) - Function execution environment variable `APPWRITE_FUNCTION_ENV_NAME` renamed to `APPWRITE_FUNCTION_RUNTIME_NAME` (#1101) - Function execution environment variable `APPWRITE_FUNCTION_ENV_VERSION` renamed to `APPWRITE_FUNCTION_RUNTIME_VERSION` (#1101) -- Introdcues rate limits for: +- Introduces rate limits for: - Team invite (10 requests in every 60 minutes per IP address) (#1088) +- Rename param `inviteId` to the more accurate `membershipId` in the Teams API (#1129) # Version 0.7.2 diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 0e6484fdc..e41e5531f 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -72,7 +72,7 @@ trait TeamsBaseClient $this->assertEquals('Invitation to '.$teamName.' Team at '.$this->getProject()['name'], $lastEmail['subject']); $secret = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); - $membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 10, 13); + $membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 13); $userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 13); /** diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 76dc17099..060e8ad0a 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -464,7 +464,7 @@ trait WebhooksBase $lastEmail = $this->getLastEmail(); $secret = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); - $membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 10, 13); + $membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 13); $userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 13); $webhook = $this->getLastRequest();