summaryrefslogtreecommitdiff
path: root/test/web/websub/websub_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2018-12-02 18:17:26 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2018-12-04 14:04:06 +0300
commitc508d41c349c3034211f41281cfe60c70a020575 (patch)
tree87d61f8a716db06c4d107aa193c09890cabf4dc1 /test/web/websub/websub_test.exs
parent87109482f336422186981c80eb3c3023637f09e8 (diff)
downloadpleroma-c508d41c349c3034211f41281cfe60c70a020575.tar.gz
pleroma-c508d41c349c3034211f41281cfe60c70a020575.zip
add http requests mock
Diffstat (limited to 'test/web/websub/websub_test.exs')
-rw-r--r--test/web/websub/websub_test.exs8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/web/websub/websub_test.exs b/test/web/websub/websub_test.exs
index f3d2da81a..47d1a88e1 100644
--- a/test/web/websub/websub_test.exs
+++ b/test/web/websub/websub_test.exs
@@ -13,13 +13,7 @@ defmodule Pleroma.Web.WebsubTest do
import Tesla.Mock
setup do
- mock fn
- %{method: :get, url: "https://mastodon.social/users/lambadalambda.atom"} ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/lambadalambda.atom")}
- %{method: :post, url: "http://example.org/needs_refresh"} ->
- %Tesla.Env{status: 200, body: ""}
- end
-
+ mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
end