TransmogrifierTest: Add test for deactivated users

This commit is contained in:
lain 2020-08-04 14:15:32 +02:00
parent e92c040ad3
commit 0cfadcf2ca
1 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,14 @@ test "it does not crash if the object in inReplyTo can't be fetched" do
end) =~ "[warn] Couldn't fetch \"https://404.site/whatever\", error: nil"
end
test "it does not work for deactivated users" do
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()
insert(:user, ap_id: data["actor"], deactivated: true)
assert {:error, _} = Transmogrifier.handle_incoming(data)
end
test "it works for incoming notices" do
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()