defmodule Pleroma.Web.MastodonAPI.ConversationViewTest do
use Pleroma.DataCase
- alias Pleroma.Web.CommonAPI
alias Pleroma.Conversation.Participation
+ alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.ConversationView
import Pleroma.Factory
assert participation
conversation =
- ConversationView.render("participation.json", %{participation: participation, user: user})
+ ConversationView.render("participation.json", %{participation: participation, for: user})
assert conversation.id == participation.id |> to_string()
assert conversation.last_status.id == activity.id
assert [account] = conversation.accounts
assert account.id == other_user.id
-
- assert recipients = conversation.pleroma.recipients
- recipient_ids = recipients |> Enum.map(& &1.id)
-
- assert user.id in recipient_ids
- assert other_user.id in recipient_ids
end
end