diff options
| author | lain <lain@soykaf.club> | 2020-06-23 10:17:12 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-23 10:17:12 +0200 |
| commit | 2c603f20098d7f342e1cbad8e6a6c86b007c5a99 (patch) | |
| tree | dd9a339daed6a25e758167413d9231e22ce42ac4 /test/web/media_proxy/invalidations/http_test.exs | |
| parent | b05f795326b77edd881ffea2c004d7ca0ddd7df9 (diff) | |
| parent | 3875a507d4b52df7edbda376d3ed31ad52241ac5 (diff) | |
| download | pleroma-2c603f20098d7f342e1cbad8e6a6c86b007c5a99.tar.gz pleroma-2c603f20098d7f342e1cbad8e6a6c86b007c5a99.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into update-validator
Diffstat (limited to 'test/web/media_proxy/invalidations/http_test.exs')
| -rw-r--r-- | test/web/media_proxy/invalidations/http_test.exs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/web/media_proxy/invalidations/http_test.exs b/test/web/media_proxy/invalidations/http_test.exs index 8a3b4141c..a1bef5237 100644 --- a/test/web/media_proxy/invalidations/http_test.exs +++ b/test/web/media_proxy/invalidations/http_test.exs @@ -5,6 +5,10 @@ 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"} -> @@ -14,8 +18,8 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.HttpTest do refute capture_log(fn -> assert Invalidation.Http.purge( ["http://example.com/media/example.jpg"], - %{} - ) == {:ok, "success"} + [] + ) == {:ok, ["http://example.com/media/example.jpg"]} end) =~ "Error while cache purge" end @@ -28,8 +32,8 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.HttpTest do assert capture_log(fn -> assert Invalidation.Http.purge( ["http://example.com/media/example1.jpg"], - %{} - ) == {:ok, "success"} + [] + ) == {:ok, ["http://example.com/media/example1.jpg"]} end) =~ "Error while cache purge: url - http://example.com/media/example1.jpg" end end |
