diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-03-12 16:02:24 +0400 |
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-03-12 16:02:24 +0400 |
| commit | d1c7f8e576e31487544b57d67802843b8ef38388 (patch) | |
| tree | 891a5578ef2ad9d48230432d32b9e85cf9d575fc /test/support | |
| parent | 0f386110c6e15148ff1ff5ea3451885485fcb7ff (diff) | |
| parent | 00d17520314e3591caaa7ab4ca39c6227a6bdf15 (diff) | |
| download | pleroma-d1c7f8e576e31487544b57d67802843b8ef38388.tar.gz pleroma-d1c7f8e576e31487544b57d67802843b8ef38388.zip | |
Merge remote-tracking branch 'origin/develop' into global-status-expiration
Diffstat (limited to 'test/support')
| -rw-r--r-- | test/support/data_case.ex | 2 | ||||
| -rw-r--r-- | test/support/http_request_mock.ex | 8 | ||||
| -rw-r--r-- | test/support/mrf_module_mock.ex | 2 | ||||
| -rw-r--r-- | test/support/web_push_http_client_mock.ex | 2 | ||||
| -rw-r--r-- | test/support/websocket_client.ex | 2 |
5 files changed, 12 insertions, 4 deletions
diff --git a/test/support/data_case.ex b/test/support/data_case.ex index 4ffcbac9e..1669f2520 100644 --- a/test/support/data_case.ex +++ b/test/support/data_case.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.DataCase do diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index d46887865..e72638814 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -1277,6 +1277,10 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{status: 404, body: ""}} end + def get("https://relay.mastodon.host/actor", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/relay/relay.json")}} + end + def get(url, query, body, headers) do {:error, "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{ @@ -1289,6 +1293,10 @@ defmodule HttpRequestMock do def post(url, query \\ [], body \\ [], headers \\ []) + def post("https://relay.mastodon.host/inbox", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: ""}} + end + def post("http://example.org/needs_refresh", _, _, _) do {:ok, %Tesla.Env{ diff --git a/test/support/mrf_module_mock.ex b/test/support/mrf_module_mock.ex index 632c7ff1d..028ea542a 100644 --- a/test/support/mrf_module_mock.ex +++ b/test/support/mrf_module_mock.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule MRFModuleMock do diff --git a/test/support/web_push_http_client_mock.ex b/test/support/web_push_http_client_mock.ex index 1d6ccff7e..3cd12957d 100644 --- a/test/support/web_push_http_client_mock.ex +++ b/test/support/web_push_http_client_mock.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.WebPushHttpClientMock do diff --git a/test/support/websocket_client.ex b/test/support/websocket_client.ex index 121231452..8c9d4b2b4 100644 --- a/test/support/websocket_client.ex +++ b/test/support/websocket_client.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Integration.WebsocketClient do |
