Skip to content

Instantly share code, notes, and snippets.

@Hajto
Created October 30, 2016 17:33
Show Gist options
  • Save Hajto/dd9fbbeb9f6580f272f8d462af85fc0a to your computer and use it in GitHub Desktop.
Save Hajto/dd9fbbeb9f6580f272f8d462af85fc0a to your computer and use it in GitHub Desktop.
defmodule EveryColor.ColorSocketTest do
use EveryColor.ChannelCase
alias EveryColor.DistributionChannel
test "Joins and receives a color" do
{:ok, _, socket} =
socket("user_id", %{some: :assign})
|> subscribe_and_join(DistributionChannel, "colors")
assert_reply socket, :ok, %{color: _ }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment