X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fobject_test.exs;h=198d3b1cf1ac969016e0ca5effc2f0000ee9210b;hb=577b11167cb55203d30c43773f40108a87b2be6d;hp=5690bedece2261874a39adc5bd9322394e49e3e7;hpb=a56db789359c7c7d57b45e6c68f791eeadc171e4;p=akkoma
diff --git a/test/object_test.exs b/test/object_test.exs
index 5690bedec..198d3b1cf 100644
--- a/test/object_test.exs
+++ b/test/object_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.ObjectTest do
@@ -74,7 +74,8 @@ defmodule Pleroma.ObjectTest do
end
describe "delete attachments" do
- clear_config([Pleroma.Upload])
+ setup do: clear_config([Pleroma.Upload])
+ setup do: clear_config([:instance, :cleanup_attachments])
test "Disabled via config" do
Pleroma.Config.put([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
@@ -379,7 +380,8 @@ defmodule Pleroma.ObjectTest do
user = insert(:user)
activity = Activity.get_create_by_object_ap_id(object.data["id"])
- {:ok, _activity, object} = CommonAPI.favorite(activity.id, user)
+ {:ok, activity} = CommonAPI.favorite(user, activity.id)
+ object = Object.get_by_ap_id(activity.data["object"])
assert object.data["like_count"] == 1