From 7ac138cdf7eea7292041e7ba8722206b4ebc0402 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Sat, 16 May 2026 11:51:18 +0800 Subject: [PATCH] Fix Unsubscribe Tests --- tests/ConvertKitAPITest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ConvertKitAPITest.php b/tests/ConvertKitAPITest.php index bf2ea2f..b6f6aa5 100644 --- a/tests/ConvertKitAPITest.php +++ b/tests/ConvertKitAPITest.php @@ -4060,6 +4060,9 @@ public function testUnsubscribeByEmail() email_address: $emailAddress ); + // Wait a moment to ensure subscriber is created. + sleep(3); + // Unsubscribe. $this->assertNull($this->api->unsubscribe_by_email($emailAddress)); } @@ -4107,6 +4110,9 @@ public function testUnsubscribe() email_address: $emailAddress ); + // Wait a moment to ensure subscriber is created. + sleep(3); + // Unsubscribe. $this->assertNull($this->api->unsubscribe($result->subscriber->id)); }