diff options
author | lain <lain@soykaf.club> | 2020-11-04 16:18:11 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-11-04 16:18:11 +0100 |
commit | bae48c98e32af6c43fa668771c6253f299d4bf8a (patch) | |
tree | 0ceb2b31a2c65af23039e4074c51c495dd7dd8f8 /test/support | |
parent | 04b7505c75afbaa1f785b2adaf0313e9b0935fab (diff) | |
parent | 4800ee656bbcd8fe21fe56531123d3a18eccc911 (diff) | |
download | pleroma-bae48c98e32af6c43fa668771c6253f299d4bf8a.tar.gz pleroma-bae48c98e32af6c43fa668771c6253f299d4bf8a.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into alexgleason/pleroma-block-behavior
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/conn_case.ex | 22 | ||||
-rw-r--r-- | test/support/oban_helpers.ex | 3 |
2 files changed, 3 insertions, 22 deletions
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index 9316a82e4..47cb65a80 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -112,28 +112,6 @@ defmodule Pleroma.Web.ConnCase do defp json_response_and_validate_schema(conn, _status) do flunk("Response schema not found for #{conn.method} #{conn.request_path} #{conn.status}") end - - defp ensure_federating_or_authenticated(conn, url, user) do - initial_setting = Config.get([:instance, :federating]) - on_exit(fn -> Config.put([:instance, :federating], initial_setting) end) - - Config.put([:instance, :federating], false) - - conn - |> get(url) - |> response(403) - - conn - |> assign(:user, user) - |> get(url) - |> response(200) - - Config.put([:instance, :federating], true) - - conn - |> get(url) - |> response(200) - end end end diff --git a/test/support/oban_helpers.ex b/test/support/oban_helpers.ex index 9f90a821c..2468f66dc 100644 --- a/test/support/oban_helpers.ex +++ b/test/support/oban_helpers.ex @@ -7,6 +7,8 @@ defmodule Pleroma.Tests.ObanHelpers do Oban test helpers. """ + require Ecto.Query + alias Pleroma.Repo def wipe_all do @@ -15,6 +17,7 @@ defmodule Pleroma.Tests.ObanHelpers do def perform_all do Oban.Job + |> Ecto.Query.where(state: "available") |> Repo.all() |> perform() end |