Tests: Remove unneeded explicit cachex use.
Only use cachex when we're actually testing it.
This commit is contained in:
parent
c1129ff674
commit
b4b68b71fc
17 changed files with 10 additions and 47 deletions
|
|
@ -9,10 +9,6 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.HttpTest do
|
|||
import ExUnit.CaptureLog
|
||||
import Tesla.Mock
|
||||
|
||||
setup do
|
||||
on_exit(fn -> Cachex.clear(:banned_urls_cache) end)
|
||||
end
|
||||
|
||||
test "logs hasn't error message when request is valid" do
|
||||
mock(fn
|
||||
%{method: :purge, url: "http://example.com/media/example.jpg"} ->
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.ScriptTest do
|
|||
|
||||
import ExUnit.CaptureLog
|
||||
|
||||
setup do
|
||||
on_exit(fn -> Cachex.clear(:banned_urls_cache) end)
|
||||
end
|
||||
|
||||
test "it logger error when script not found" do
|
||||
assert capture_log(fn ->
|
||||
assert Invalidation.Script.purge(
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@ defmodule Pleroma.Web.MediaProxy.InvalidationTest do
|
|||
|
||||
setup do: clear_config([:media_proxy])
|
||||
|
||||
setup do
|
||||
on_exit(fn -> Cachex.clear(:banned_urls_cache) end)
|
||||
end
|
||||
|
||||
describe "Invalidation.Http" do
|
||||
test "perform request to clear cache" do
|
||||
Config.put([:media_proxy, :enabled], false)
|
||||
|
|
|
|||
|
|
@ -10,10 +10,6 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||
alias Pleroma.Web.MediaProxy
|
||||
alias Plug.Conn
|
||||
|
||||
setup do
|
||||
on_exit(fn -> Cachex.clear(:banned_urls_cache) end)
|
||||
end
|
||||
|
||||
describe "Media Proxy" do
|
||||
setup do
|
||||
clear_config([:media_proxy, :enabled], true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue