aboutsummaryrefslogtreecommitdiff
path: root/test/web/media_proxy
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-29 12:36:17 +0200
committerlain <lain@soykaf.club>2020-05-29 12:36:17 +0200
commitaf6d01ec93a07cd896bc4f0a2c2cf437c6fd51fc (patch)
tree54e02858d0fa9ca905ffe5a057c9f0accbeae115 /test/web/media_proxy
parentdbd07d29a358a446d87078d60b993a59b757ad1d (diff)
parent396bc69aeef951f163c0c20474ce4653df1dd667 (diff)
downloadpleroma-af6d01ec93a07cd896bc4f0a2c2cf437c6fd51fc.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/media_proxy')
-rw-r--r--test/web/media_proxy/media_proxy_test.exs14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/web/media_proxy/media_proxy_test.exs b/test/web/media_proxy/media_proxy_test.exs
index 69c2d5dae..69d2a71a6 100644
--- a/test/web/media_proxy/media_proxy_test.exs
+++ b/test/web/media_proxy/media_proxy_test.exs
@@ -124,15 +124,7 @@ defmodule Pleroma.Web.MediaProxyTest do
end
test "uses the configured base_url" do
- base_url = Pleroma.Config.get([:media_proxy, :base_url])
-
- if base_url do
- on_exit(fn ->
- Pleroma.Config.put([:media_proxy, :base_url], base_url)
- end)
- end
-
- Pleroma.Config.put([:media_proxy, :base_url], "https://cache.pleroma.social")
+ clear_config([:media_proxy, :base_url], "https://cache.pleroma.social")
url = "https://pleroma.soykaf.com/static/logo.png"
encoded = url(url)
@@ -213,8 +205,8 @@ defmodule Pleroma.Web.MediaProxyTest do
end
test "does not change whitelisted urls" do
- Pleroma.Config.put([:media_proxy, :whitelist], ["mycdn.akamai.com"])
- Pleroma.Config.put([:media_proxy, :base_url], "https://cache.pleroma.social")
+ clear_config([:media_proxy, :whitelist], ["mycdn.akamai.com"])
+ clear_config([:media_proxy, :base_url], "https://cache.pleroma.social")
media_url = "https://mycdn.akamai.com"