} do
user2 = insert(:user)
task = Task.async(fn -> assert_receive {:text, _}, @streamer_timeout end)
-
+
Process.sleep(@streamer_start_wait)
Streamer.add_socket(
task =
Task.async(fn ->
- assert_receive {:text, _}, @streamer_timeout
+ assert_receive {:text, _}, @streamer_timeout
end)
fake_socket = %StreamerSocket{
task =
Task.async(fn ->
-
assert_receive {:text, received_event}, @streamer_timeout
assert %{"event" => "delete", "payload" => _} = Jason.decode!(received_event)
assert_receive {:text, received_event}, @streamer_timeout
+
assert %{"event" => "conversation", "payload" => received_payload} =
Jason.decode!(received_event)