X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fupload%2Ffilter_test.exs;h=352b664024ed68e94a0f3477b3b37e04d55da685;hb=95759310abb597275335936efa4a59615b16da6e;hp=640cd71079997402c1572af6af4e0838cc089e8d;hpb=21e3f9ac69e258d7c46e0f2acdcf011f74cba8e3;p=akkoma
diff --git a/test/upload/filter_test.exs b/test/upload/filter_test.exs
index 640cd7107..352b66402 100644
--- a/test/upload/filter_test.exs
+++ b/test/upload/filter_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload.FilterTest do
@@ -8,13 +8,7 @@ defmodule Pleroma.Upload.FilterTest do
alias Pleroma.Config
alias Pleroma.Upload.Filter
- setup do
- custom_filename = Config.get([Pleroma.Upload.Filter.AnonymizeFilename, :text])
-
- on_exit(fn ->
- Config.put([Pleroma.Upload.Filter.AnonymizeFilename, :text], custom_filename)
- end)
- end
+ setup do: clear_config([Pleroma.Upload.Filter.AnonymizeFilename, :text])
test "applies filters" do
Config.put([Pleroma.Upload.Filter.AnonymizeFilename, :text], "custom-file.png")