aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/web/pleroma_api/pleroma_api_controller_test.exs18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/web/pleroma_api/pleroma_api_controller_test.exs b/test/web/pleroma_api/pleroma_api_controller_test.exs
index 56bc1572c..ed6b79727 100644
--- a/test/web/pleroma_api/pleroma_api_controller_test.exs
+++ b/test/web/pleroma_api/pleroma_api_controller_test.exs
@@ -11,6 +11,24 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do
import Pleroma.Factory
+ test "/api/v1/pleroma/conversations/:id", %{conn: conn} do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ {:ok, _activity} =
+ CommonAPI.post(user, %{"status" => "Hi @#{other_user.nickname}!", "visibility" => "direct"})
+
+ [participation] = Participation.for_user(other_user)
+
+ result =
+ conn
+ |> assign(:user, other_user)
+ |> get("/api/v1/pleroma/conversations/#{participation.id}")
+ |> json_response(200)
+
+ assert result["id"] == participation.id |> to_string()
+ end
+
test "/api/v1/pleroma/conversations/:id/statuses", %{conn: conn} do
user = insert(:user)
other_user = insert(:user)