Commit fd0aa58e authored by kaniini's avatar kaniini
Browse files

tests: add test for as:Public issues

parent d487b753
......@@ -335,6 +335,29 @@ test "it does not clobber the addressing on announce activities" do
assert data["to"] == [""]
test "it ensures that as:Public activities make it to their followers collection" do
user = insert(:user)
data =!("test/fixtures/mastodon-post-activity.json")
|> Poison.decode!()
|> Map.put("actor", user.ap_id)
|> Map.put("to", [""])
|> Map.put("cc", [])
object =
|> Map.put("attributedTo", user.ap_id)
|> Map.put("to", [""])
|> Map.put("cc", [])
data = Map.put(data, "object", object)
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
assert data["cc"] == [User.ap_followers(user)]
test "it works for incoming update activities" do
data =!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment