summaryrefslogtreecommitdiff
path: root/test/web/rich_media/controllers
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-01-26 15:47:52 +0000
committerkaniini <nenolod@gmail.com>2019-01-26 15:47:52 +0000
commite91f867cc9f372da2262a3ac95a23bc12266595a (patch)
tree359cefdf58a23900353015b36b0bdb3c33c35a93 /test/web/rich_media/controllers
parentc00fba4f7dcf10c49bf1fa03be348e7c99a3fc47 (diff)
parent1f7843b9b8afcb559c8ba59388724dbf4ef3e3c9 (diff)
downloadpleroma-e91f867cc9f372da2262a3ac95a23bc12266595a.tar.gz
pleroma-e91f867cc9f372da2262a3ac95a23bc12266595a.zip
Merge branch 'features/mastoapi-cards' into 'develop'
MastoAPI: Add Rich-Media support See merge request pleroma/pleroma!664
Diffstat (limited to 'test/web/rich_media/controllers')
-rw-r--r--test/web/rich_media/controllers/rich_media_controller_test.exs17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/web/rich_media/controllers/rich_media_controller_test.exs b/test/web/rich_media/controllers/rich_media_controller_test.exs
index 37c82631f..fef126513 100644
--- a/test/web/rich_media/controllers/rich_media_controller_test.exs
+++ b/test/web/rich_media/controllers/rich_media_controller_test.exs
@@ -1,19 +1,14 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.RichMedia.RichMediaControllerTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
+ import Tesla.Mock
setup do
- Tesla.Mock.mock(fn
- %{
- method: :get,
- url: "http://example.com/ogp"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}
-
- %{method: :get, url: "http://example.com/empty"} ->
- %Tesla.Env{status: 200, body: "hello"}
- end)
-
+ mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
end