channel_case.ex 766 B

12345678910111213141516171819202122232425262728293031323334
  1. defmodule WebWeb.ChannelCase do
  2. @moduledoc """
  3. This module defines the test case to be used by
  4. channel tests.
  5. Such tests rely on `Phoenix.ChannelTest` and also
  6. import other functionality to make it easier
  7. to build common datastructures and query the data layer.
  8. Finally, if the test case interacts with the database,
  9. it cannot be async. For this reason, every test runs
  10. inside a transaction which is reset at the beginning
  11. of the test unless the test case is marked as async.
  12. """
  13. use ExUnit.CaseTemplate
  14. using do
  15. quote do
  16. # Import conveniences for testing with channels
  17. use Phoenix.ChannelTest
  18. # The default endpoint for testing
  19. @endpoint WebWeb.Endpoint
  20. end
  21. end
  22. setup _tags do
  23. :ok
  24. end
  25. end