user = insert(:user)
# Unannouncing an object that is not announced does nothing
- #{:ok, object} = ActivityPub.unannounce(user, object)
- #assert object.data["announcement_count"] == 0
+ # {:ok, object} = ActivityPub.unannounce(user, object)
+ # assert object.data["announcement_count"] == 0
{:ok, announce_activity, object} = ActivityPub.announce(user, object)
assert object.data["announcement_count"] == 1
assert unannounce_activity.data["to"] == [
User.ap_followers(user),
announce_activity.data["actor"]
- ]
+ ]
+
assert unannounce_activity.data["type"] == "Undo"
assert unannounce_activity.data["object"] == announce_activity.data["id"]
assert unannounce_activity.data["actor"] == user.ap_id
|> assign(:user, user)
|> post("/api/v1/statuses/#{activity.id}/unreblog")
- assert %{"id" => id, "reblogged" => false, "reblogs_count" => 0} =
- json_response(conn, 200)
+ assert %{"id" => id, "reblogged" => false, "reblogs_count" => 0} = json_response(conn, 200)
assert to_string(activity.id) == id
end