summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views/conversation_view_test.exs
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-10-13 19:22:32 -0500
committerAlex Gleason <alex@alexgleason.me>2020-10-13 19:22:32 -0500
commitb3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe (patch)
tree09f6b8bafcfb784c581800887d80a22d0461af0b /test/web/mastodon_api/views/conversation_view_test.exs
parent5c8d2c468c3a14cde029e7aeedd0cdb580cce1df (diff)
parent481906207e6d803e5c4d3e455c7b93119e392177 (diff)
downloadpleroma-b3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe.tar.gz
pleroma-b3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe.zip
Merge remote-tracking branch 'upstream/develop' into block-behavior
Diffstat (limited to 'test/web/mastodon_api/views/conversation_view_test.exs')
-rw-r--r--test/web/mastodon_api/views/conversation_view_test.exs44
1 files changed, 0 insertions, 44 deletions
diff --git a/test/web/mastodon_api/views/conversation_view_test.exs b/test/web/mastodon_api/views/conversation_view_test.exs
deleted file mode 100644
index 2e8203c9b..000000000
--- a/test/web/mastodon_api/views/conversation_view_test.exs
+++ /dev/null
@@ -1,44 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.Web.MastodonAPI.ConversationViewTest do
- use Pleroma.DataCase
-
- alias Pleroma.Conversation.Participation
- alias Pleroma.Web.CommonAPI
- alias Pleroma.Web.MastodonAPI.ConversationView
-
- import Pleroma.Factory
-
- test "represents a Mastodon Conversation entity" do
- user = insert(:user)
- other_user = insert(:user)
-
- {:ok, parent} = CommonAPI.post(user, %{status: "parent"})
-
- {:ok, activity} =
- CommonAPI.post(user, %{
- status: "hey @#{other_user.nickname}",
- visibility: "direct",
- in_reply_to_id: parent.id
- })
-
- {:ok, _reply_activity} =
- CommonAPI.post(user, %{status: "hu", visibility: "public", in_reply_to_id: parent.id})
-
- [participation] = Participation.for_user_with_last_activity_id(user)
-
- assert participation
-
- conversation =
- 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 conversation.last_status.pleroma.direct_conversation_id == participation.id
- end
-end