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(); });