X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fupload%2Ffilter%2Fmogrify_test.exs;h=62ca304877ca3f02a73229eb761493403410b76e;hb=97b57014496003cabb416766457552ef854fa658;hp=c301440fdc69d165d440cb0f0a136716be0a0eef;hpb=36049f08efadb5f6f727753ecc1f7be6a5b4e3d8;p=akkoma
diff --git a/test/upload/filter/mogrify_test.exs b/test/upload/filter/mogrify_test.exs
index c301440fd..62ca30487 100644
--- a/test/upload/filter/mogrify_test.exs
+++ b/test/upload/filter/mogrify_test.exs
@@ -1,32 +1,22 @@
# 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.Filter.MogrifyTest do
use Pleroma.DataCase
import Mock
- alias Pleroma.Config
- alias Pleroma.Upload
alias Pleroma.Upload.Filter
- setup do
- filter = Config.get([Filter.Mogrify, :args])
-
- on_exit(fn ->
- Config.put([Filter.Mogrify, :args], filter)
- end)
- end
-
test "apply mogrify filter" do
- Config.put([Filter.Mogrify, :args], [{"tint", "40"}])
+ clear_config(Filter.Mogrify, args: [{"tint", "40"}])
File.cp!(
"test/fixtures/image.jpg",
"test/fixtures/image_tmp.jpg"
)
- upload = %Upload{
+ upload = %Pleroma.Upload{
name: "an⦠image.jpg",
content_type: "image/jpg",
path: Path.absname("test/fixtures/image_tmp.jpg"),