unit test broadcast_from logic

I have a channel that does broadcast_from inside some handle_in method, so I’d like to write a unit test that assert that channel client that sends a message doesn’t get a broadcast, but all other client get it.

I have to test clients:

{:ok, _, s1} = socket("user1", %{user: user}) |> join(OraChannel, "ora:101")
{:ok, _, _s2} = subscribe_and_join(socket(), OraChannel, "ora:101")

ref = push(s1, "join")

The problem is that refute_broadcast fails because test process still gets broadcast.

Does anybody know the right way to test it? Like spawning separate processes for each clients.