diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-27 16:47:30 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-28 09:30:34 +0300 |
commit | ddb91106b6417ab58f883ad816c17a7f09fc71b2 (patch) | |
tree | 936ca5c06a7830814b21f463cc943d57d7e52b41 /test | |
parent | 1a7ed04f9c67c2fe90d10976f40cf972ca726653 (diff) | |
download | pleroma-ddb91106b6417ab58f883ad816c17a7f09fc71b2.tar.gz |
update attachments_cleanup_worker.ex
Diffstat (limited to 'test')
-rw-r--r-- | test/object_test.exs | 2 | ||||
-rw-r--r-- | test/web/media_proxy/invalidation_test.exs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/test/object_test.exs b/test/object_test.exs index 198d3b1cf..085469495 100644 --- a/test/object_test.exs +++ b/test/object_test.exs @@ -76,6 +76,7 @@ defmodule Pleroma.ObjectTest do describe "delete attachments" do setup do: clear_config([Pleroma.Upload]) setup do: clear_config([:instance, :cleanup_attachments]) + setup do: clear_config([:media_proxy]) test "Disabled via config" do Pleroma.Config.put([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local) @@ -109,6 +110,7 @@ defmodule Pleroma.ObjectTest do refute Object.get_by_id(attachment.id) == nil assert {:ok, ["an_image.jpg"]} == File.ls("#{uploads_dir}/#{path}") + refute Pleroma.Web.MediaProxy.in_deleted_urls(href) end test "in subdirectories" do diff --git a/test/web/media_proxy/invalidation_test.exs b/test/web/media_proxy/invalidation_test.exs index edddc385b..3a9fa8c88 100644 --- a/test/web/media_proxy/invalidation_test.exs +++ b/test/web/media_proxy/invalidation_test.exs @@ -38,7 +38,7 @@ defmodule Pleroma.Web.MediaProxy.InvalidationTest do assert capture_log(fn -> assert Pleroma.Web.MediaProxy.in_deleted_urls(image_url) assert Invalidation.purge([image_url]) == {:ok, [image_url]} - refute Pleroma.Web.MediaProxy.in_deleted_urls(image_url) + assert Pleroma.Web.MediaProxy.in_deleted_urls(image_url) end) =~ "Running cache purge: [\"#{image_url}\"]" end end @@ -57,7 +57,7 @@ defmodule Pleroma.Web.MediaProxy.InvalidationTest do assert capture_log(fn -> assert Pleroma.Web.MediaProxy.in_deleted_urls(image_url) assert Invalidation.purge([image_url]) == {:ok, [image_url]} - refute Pleroma.Web.MediaProxy.in_deleted_urls(image_url) + assert Pleroma.Web.MediaProxy.in_deleted_urls(image_url) end) =~ "Running cache purge: [\"#{image_url}\"]" end end |