Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 20, 2023
1 parent 590d601 commit e8091a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/Feature/Reverb/EventsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand All @@ -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();
});

0 comments on commit e8091a1

Please sign in to comment.