From e8091a101260ea1bf82f0aa6ad43da4eaab25ab2 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Mon, 20 Nov 2023 21:02:20 +0000 Subject: [PATCH] wip --- tests/Feature/Reverb/EventsControllerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Reverb/EventsControllerTest.php b/tests/Feature/Reverb/EventsControllerTest.php index 7a30bf95..94547ded 100644 --- a/tests/Feature/Reverb/EventsControllerTest.php +++ b/tests/Feature/Reverb/EventsControllerTest.php @@ -73,14 +73,14 @@ it('can ignore a subscriber', function () { $connection = $this->connect(); $this->subscribe('test-channel-two', connection: $connection); - $promiseOne = $this->messagePromise($connection); $response = await($this->signedPostRequest('events', [ 'name' => 'NewEvent', 'channels' => ['test-channel-one', 'test-channel-two'], 'data' => ['some' => 'data'], ])); - sleep(1); + expect(await($promiseOne))->toBe('{"event":"NewEvent","data":{"some":"data"},"channel":"test-channel-two"}'); + $promiseTwo = $this->messagePromise($connection); $response = await($this->signedPostRequest('events', [ @@ -92,6 +92,5 @@ $this->assertSame(200, $response->getStatusCode()); $this->assertSame('{}', $response->getBody()->getContents()); - expect(await($promiseOne))->toBe('{"event":"NewEvent","data":{"some":"data"},"channel":"test-channel-two"}'); expect(await($promiseTwo))->toBeFalse(); });