summaryrefslogtreecommitdiff
path: root/test/tasks
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-07-09 10:32:24 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-07-09 10:32:24 +0000
commit68036f5a3b7b609f4464650c2ae40b9679d45291 (patch)
tree25e0f0f372ea0f77719bb253dee13a4cd831de54 /test/tasks
parent34d6009d82ef8949d689ed1f7c4ec2c2fad254c7 (diff)
parent00e54f8fe7af098ba829f7f7cd5511569dcd1c0a (diff)
downloadpleroma-68036f5a3b7b609f4464650c2ae40b9679d45291.tar.gz
pleroma-68036f5a3b7b609f4464650c2ae40b9679d45291.zip
Merge branch 'follow-pipeline' into 'develop'
Handle `Follow` activities with the pipeline See merge request pleroma/pleroma!2734
Diffstat (limited to 'test/tasks')
-rw-r--r--test/tasks/relay_test.exs7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tasks/relay_test.exs b/test/tasks/relay_test.exs
index a8ba0658d..79ab72002 100644
--- a/test/tasks/relay_test.exs
+++ b/test/tasks/relay_test.exs
@@ -10,6 +10,8 @@ defmodule Mix.Tasks.Pleroma.RelayTest do
alias Pleroma.Web.ActivityPub.Utils
use Pleroma.DataCase
+ import Pleroma.Factory
+
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
@@ -46,7 +48,8 @@ defmodule Mix.Tasks.Pleroma.RelayTest do
describe "running unfollow" do
test "relay is unfollowed" do
- target_instance = "http://mastodon.example.org/users/admin"
+ user = insert(:user)
+ target_instance = user.ap_id
Mix.Tasks.Pleroma.Relay.run(["follow", target_instance])
@@ -71,7 +74,7 @@ defmodule Mix.Tasks.Pleroma.RelayTest do
assert undo_activity.data["type"] == "Undo"
assert undo_activity.data["actor"] == local_user.ap_id
- assert undo_activity.data["object"] == cancelled_activity.data
+ assert undo_activity.data["object"]["id"] == cancelled_activity.data["id"]
refute "#{target_instance}/followers" in User.following(local_user)
end
end