FrontendStaticPlugTest: Fix test

This commit is contained in:
Lain Soykaf 2023-12-11 10:07:39 +04:00
parent 60800c0b2b
commit b9f135eaf3
1 changed files with 7 additions and 0 deletions

View File

@ -4,7 +4,11 @@
defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
use Pleroma.Web.ConnCase
import Mock
import Mox
alias Pleroma.UnstubbedConfigMock, as: ConfigMock
@dir "test/tmp/instance_static"
@ -66,6 +70,9 @@ test "exclude invalid path", %{conn: conn} do
File.mkdir_p!("#{path}/proxy/rr/ss")
File.write!("#{path}/proxy/rr/ss/Ek7w8WPVcAApOvN.jpg:large", "FB image")
ConfigMock
|> stub_with(Pleroma.Test.StaticConfig)
url =
Pleroma.Web.MediaProxy.encode_url("https://pbs.twimg.com/media/Ek7w8WPVcAApOvN.jpg:large")