March 2018
Intermediate to advanced
304 pages
6h 59m
English
Testing your API is important, and subscriptions are no exception. We’ve been using helpers from the PlateSlate.ConnCase module in our test to ease building HTTP-based integration tests; you’ll need a similar PlateSlate.SubscriptionCase module for managing the subscription integration tests via channels. While the ConnCase module gets generated by Phoenix when we first create the project, the SubscriptionCase module we’ll need to make ourselves.
| | defmodule PlateSlateWeb.SubscriptionCase do |
| | @moduledoc """ |
| | This module defines the test case to be used by |
| | subscription tests |
| | """ |
| | |
| | use ExUnit.CaseTemplate |
| | |
| | using do |
| | quote do |
| | ... |
Read now
Unlock full access