Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit f3b706d

Browse files
committed
wip
1 parent cf40ec5 commit f3b706d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/Dashboard/SendMessageTest.php

+25
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,31 @@ public function can_send_message()
2929
]);
3030
}
3131

32+
/** @test */
33+
public function can_send_message_on_redis_replication()
34+
{
35+
$this->skipOnLocalReplication();
36+
37+
// Because the Pusher server is not active,
38+
// we expect it to turn out ok: false.
39+
// However, the driver is set to redis,
40+
// so Redis would take care of this
41+
// and stream the message to all active servers instead.
42+
43+
$this->actingAs(factory(User::class)->create())
44+
->json('POST', route('laravel-websockets.event'), [
45+
'appId' => '1234',
46+
'key' => 'TestKey',
47+
'secret' => 'TestSecret',
48+
'channel' => 'test-channel',
49+
'event' => 'some-event',
50+
'data' => json_encode(['data' => 'yes']),
51+
])
52+
->seeJson([
53+
'ok' => true,
54+
]);
55+
}
56+
3257
/** @test */
3358
public function cant_send_message_for_invalid_app()
3459
{

0 commit comments

Comments
 (0)