aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/support/null_cache.ex8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/support/null_cache.ex b/test/support/null_cache.ex
index 72e7c996a..c63df6a39 100644
--- a/test/support/null_cache.ex
+++ b/test/support/null_cache.ex
@@ -21,9 +21,11 @@ defmodule Pleroma.NullCache do
def get(_, _), do: {:ok, nil}
@impl true
- def fetch!(_, _, func) do
- {_, res} = func.()
- res
+ def fetch!(_, key, func) do
+ case func.(key) do
+ {_, res} -> res
+ res -> res
+ end
end
@impl true