forked from AkkomaGang/akkoma
Transmogrifier Test: Remove mastodon hack test.
This commit is contained in:
parent
3f6d50111e
commit
9dda13bfa1
1 changed files with 0 additions and 26 deletions
|
@ -422,32 +422,6 @@ test "it fails for incoming rejects which cannot be correlated" do
|
||||||
refute User.following?(follower, followed) == true
|
refute User.following?(follower, followed) == true
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it works for incoming rejects which are orphaned" do
|
|
||||||
follower = insert(:user)
|
|
||||||
followed = insert(:user, locked: true)
|
|
||||||
|
|
||||||
{:ok, follower} = User.follow(follower, followed)
|
|
||||||
{:ok, _, _, _follow_activity} = CommonAPI.follow(follower, followed)
|
|
||||||
|
|
||||||
assert User.following?(follower, followed) == true
|
|
||||||
|
|
||||||
reject_data =
|
|
||||||
File.read!("test/fixtures/mastodon-reject-activity.json")
|
|
||||||
|> Poison.decode!()
|
|
||||||
|> Map.put("actor", followed.ap_id)
|
|
||||||
|
|
||||||
reject_data =
|
|
||||||
Map.put(reject_data, "object", Map.put(reject_data["object"], "actor", follower.ap_id))
|
|
||||||
|
|
||||||
{:ok, activity} = Transmogrifier.handle_incoming(reject_data)
|
|
||||||
refute activity.local
|
|
||||||
assert activity.data["id"] == reject_data["id"]
|
|
||||||
|
|
||||||
follower = User.get_cached_by_id(follower.id)
|
|
||||||
|
|
||||||
assert User.following?(follower, followed) == false
|
|
||||||
end
|
|
||||||
|
|
||||||
test "it works for incoming rejects which are referenced by IRI only" do
|
test "it works for incoming rejects which are referenced by IRI only" do
|
||||||
follower = insert(:user)
|
follower = insert(:user)
|
||||||
followed = insert(:user, locked: true)
|
followed = insert(:user, locked: true)
|
||||||
|
|
Loading…
Reference in a new issue