Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1003B

  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2021 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