summaryrefslogtreecommitdiff
path: root/test/pleroma/upload/filter/anonymize_filename_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/pleroma/upload/filter/anonymize_filename_test.exs')
-rw-r--r--test/pleroma/upload/filter/anonymize_filename_test.exs7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/pleroma/upload/filter/anonymize_filename_test.exs b/test/pleroma/upload/filter/anonymize_filename_test.exs
index 7ef01ce91..9387c1abc 100644
--- a/test/pleroma/upload/filter/anonymize_filename_test.exs
+++ b/test/pleroma/upload/filter/anonymize_filename_test.exs
@@ -1,11 +1,10 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload.Filter.AnonymizeFilenameTest do
use Pleroma.DataCase
- alias Pleroma.Config
alias Pleroma.Upload
setup do
@@ -23,13 +22,13 @@ defmodule Pleroma.Upload.Filter.AnonymizeFilenameTest do
setup do: clear_config([Pleroma.Upload.Filter.AnonymizeFilename, :text])
test "it replaces filename on pre-defined text", %{upload_file: upload_file} do
- Config.put([Upload.Filter.AnonymizeFilename, :text], "custom-file.png")
+ clear_config([Upload.Filter.AnonymizeFilename, :text], "custom-file.png")
{:ok, :filtered, %Upload{name: name}} = Upload.Filter.AnonymizeFilename.filter(upload_file)
assert name == "custom-file.png"
end
test "it replaces filename on pre-defined text expression", %{upload_file: upload_file} do
- Config.put([Upload.Filter.AnonymizeFilename, :text], "custom-file.{extension}")
+ clear_config([Upload.Filter.AnonymizeFilename, :text], "custom-file.{extension}")
{:ok, :filtered, %Upload{name: name}} = Upload.Filter.AnonymizeFilename.filter(upload_file)
assert name == "custom-file.jpg"
end