tests: fix AP test failures

This commit is contained in:
William Pitcock 2019-05-12 14:38:40 +00:00
parent d823eb921b
commit 582bd9d170
1 changed files with 9 additions and 11 deletions

View File

@ -10,6 +10,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Publisher
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.CommonAPI
@ -963,8 +964,7 @@ test "it filters broken threads" do
private_activity_1 = Activity.get_by_ap_id_with_object(private_activity_1.data["id"])
assert [public_activity, private_activity_1, private_activity_3] ==
activities
assert [public_activity, private_activity_1, private_activity_3] == activities
assert length(activities) == 3
@ -1057,7 +1057,7 @@ test "it can create a Flag activity" do
actor = insert(:user)
inbox = "http://200.site/users/nick1/inbox"
assert {:ok, _} = ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert {:ok, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_reachable(inbox))
end
@ -1070,7 +1070,7 @@ test "it can create a Flag activity" do
inbox = "http://200.site/users/nick1/inbox"
assert {:ok, _} =
ActivityPub.publish_one(%{
Publisher.publish_one(%{
inbox: inbox,
json: "{}",
actor: actor,
@ -1089,7 +1089,7 @@ test "it can create a Flag activity" do
inbox = "http://200.site/users/nick1/inbox"
assert {:ok, _} =
ActivityPub.publish_one(%{
Publisher.publish_one(%{
inbox: inbox,
json: "{}",
actor: actor,
@ -1107,8 +1107,7 @@ test "it can create a Flag activity" do
actor = insert(:user)
inbox = "http://404.site/users/nick1/inbox"
assert {:error, _} =
ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert {:error, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_unreachable(inbox))
end
@ -1120,8 +1119,7 @@ test "it can create a Flag activity" do
actor = insert(:user)
inbox = "http://connrefused.site/users/nick1/inbox"
assert {:error, _} =
ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert {:error, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_unreachable(inbox))
end
@ -1133,7 +1131,7 @@ test "it can create a Flag activity" do
actor = insert(:user)
inbox = "http://200.site/users/nick1/inbox"
assert {:ok, _} = ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert {:ok, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
refute called(Instances.set_unreachable(inbox))
end
@ -1146,7 +1144,7 @@ test "it can create a Flag activity" do
inbox = "http://connrefused.site/users/nick1/inbox"
assert {:error, _} =
ActivityPub.publish_one(%{
Publisher.publish_one(%{
inbox: inbox,
json: "{}",
actor: actor,