Test the Subscriptions
Learn how to test your API and subscriptions.
We'll cover the following...
We'll cover the following...
Subscriptions testing
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. We’ll need a similar PlateSlate.SubscriptionCase module to manage the subscription integration tests with channels. While the ConnCase module is generated by Phoenix when we first create the project, we’ll need to make the SubscriptionCase module ourselves:
This module sets up the socket we’ll use in each of our test cases, and also gives us a ...