logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

channel_case.ex (1003B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.ChannelCase do
  5. @moduledoc """
  6. This module defines the test case to be used by
  7. channel tests.
  8. Such tests rely on `Phoenix.ChannelTest` and also
  9. import other functionality to make it easier
  10. to build common datastructures and query the data layer.
  11. Finally, if the test case interacts with the database,
  12. it cannot be async. For this reason, every test runs
  13. inside a transaction which is reset at the beginning
  14. of the test unless the test case is marked as async.
  15. """
  16. use ExUnit.CaseTemplate
  17. using do
  18. quote do
  19. # Import conveniences for testing with channels
  20. import Phoenix.ChannelTest
  21. use Pleroma.Tests.Helpers
  22. # The default endpoint for testing
  23. @endpoint Pleroma.Web.Endpoint
  24. end
  25. end
  26. setup tags, do: Pleroma.DataCase.setup_multi_process_mode(tags)
  27. end