From 95a9bdfc374a013be47e74b25bdba5d91f51948b Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 18 Dec 2020 19:49:01 +0100 Subject: Tests: Use NullCache for async tests. Caching can't work in async tests, so for them it is mocked to a null cache that is always empty. Synchronous tests are stubbed with the real Cachex, which is emptied after every test. --- test/support/mocks.ex | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/support/mocks.ex (limited to 'test/support/mocks.ex') diff --git a/test/support/mocks.ex b/test/support/mocks.ex new file mode 100644 index 000000000..d790553cd --- /dev/null +++ b/test/support/mocks.ex @@ -0,0 +1,5 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2020 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + +Mox.defmock(Pleroma.CachexMock, for: Pleroma.Caching) -- cgit v1.2.3