Skip to content

Instantly share code, notes, and snippets.

@zacck-zz
Created September 7, 2018 10:20
Show Gist options
  • Save zacck-zz/08ec889c6f82acc4ed152c230552fc9b to your computer and use it in GitHub Desktop.
Save zacck-zz/08ec889c6f82acc4ed152c230552fc9b to your computer and use it in GitHub Desktop.
defmodule ApiWeb.SubscriptionCase do
@moduledoc """
This module contains the setup cases for subscriptions tests in the Application
"""
use ExUnit.CaseTemplate
using do
quote do
use ApiWeb.ChannelCase
use Absinthe.Phoenix.SubscriptionTest,
schema: ApiWeb.Schema
setup do
{:ok, socket} = Phoenix.ChannelTest.connect(ApiWeb.UserSocket, %{})
{:ok, socket} = Absinthe.Phoenix.SubscriptionTest.join_absinthe(socket)
{:ok, socket: socket}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment