X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fobject_test.exs;h=198d3b1cf1ac969016e0ca5effc2f0000ee9210b;hb=fc9d0b6eec1b206a27f4ec19f7939b3318a209ef;hp=75f192da2fab2bbb000f31e188752acc9c3849cf;hpb=13918cb545d583decfb728300850b307c59e2031;p=akkoma
diff --git a/test/object_test.exs b/test/object_test.exs
index 75f192da2..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,8 +74,8 @@ defmodule Pleroma.ObjectTest do
end
describe "delete attachments" do
- clear_config([Pleroma.Upload])
- clear_config([:instance, :cleanup_attachments])
+ 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)
@@ -380,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