ActivityPub: Remove follow and fix issues.
This commit is contained in:
parent
9dda8b5427
commit
00e54f8fe7
10 changed files with 43 additions and 77 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue