mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
FrontendStaticPlugTest: Fix test
This commit is contained in:
parent
60800c0b2b
commit
b9f135eaf3
1 changed files with 7 additions and 0 deletions
|
@ -4,7 +4,11 @@
|
||||||
|
|
||||||
defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
|
defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase
|
||||||
|
|
||||||
import Mock
|
import Mock
|
||||||
|
import Mox
|
||||||
|
|
||||||
|
alias Pleroma.UnstubbedConfigMock, as: ConfigMock
|
||||||
|
|
||||||
@dir "test/tmp/instance_static"
|
@dir "test/tmp/instance_static"
|
||||||
|
|
||||||
|
@ -66,6 +70,9 @@ defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
|
||||||
File.mkdir_p!("#{path}/proxy/rr/ss")
|
File.mkdir_p!("#{path}/proxy/rr/ss")
|
||||||
File.write!("#{path}/proxy/rr/ss/Ek7w8WPVcAApOvN.jpg:large", "FB image")
|
File.write!("#{path}/proxy/rr/ss/Ek7w8WPVcAApOvN.jpg:large", "FB image")
|
||||||
|
|
||||||
|
ConfigMock
|
||||||
|
|> stub_with(Pleroma.Test.StaticConfig)
|
||||||
|
|
||||||
url =
|
url =
|
||||||
Pleroma.Web.MediaProxy.encode_url("https://pbs.twimg.com/media/Ek7w8WPVcAApOvN.jpg:large")
|
Pleroma.Web.MediaProxy.encode_url("https://pbs.twimg.com/media/Ek7w8WPVcAApOvN.jpg:large")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue