diff options
author | Mark Felder <feld@feld.me> | 2024-02-06 14:34:59 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-02-06 18:33:54 -0500 |
commit | 6b7b443ff95587b33f4b666e68ed82dc6fb485a5 (patch) | |
tree | 035b15931ca6f06f490425af8c15f27b5136e733 /test/support/null_cache.ex | |
parent | e9573627792df4cdaea15f1ca1563594f477cd8e (diff) | |
download | pleroma-6b7b443ff95587b33f4b666e68ed82dc6fb485a5.tar.gz pleroma-6b7b443ff95587b33f4b666e68ed82dc6fb485a5.zip |
Pleroma.Web.RichMedia.Parser: Remove test-specific codepaths
Also consolidate Tesla mocks into the HttpRequestMock module.
Tests were not exercising the real codepaths. The Rich Media Preview only works with https, but most of these tests were only mocking http.
Diffstat (limited to 'test/support/null_cache.ex')
-rw-r--r-- | test/support/null_cache.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/support/null_cache.ex b/test/support/null_cache.ex index 9f1d45f1d..47c84174e 100644 --- a/test/support/null_cache.ex +++ b/test/support/null_cache.ex @@ -29,6 +29,9 @@ defmodule Pleroma.NullCache do end @impl true + def fetch(_, key, func), do: func.(key) + + @impl true def get_and_update(_, _, func) do func.(nil) end @@ -37,6 +40,9 @@ defmodule Pleroma.NullCache do def expire_at(_, _, _), do: {:ok, true} @impl true + def expire(_, _, _), do: {:ok, true} + + @impl true def exists?(_, _), do: {:ok, false} @impl true |