Testing Subscriptions
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â ... |
Get Craft GraphQL APIs in Elixir with Absinthe now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.