summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoreugenijm <eugenijm@protonmail.com>2019-09-19 08:27:55 +0300
committereugenijm <eugenijm@protonmail.com>2019-09-19 08:59:25 +0300
commitfe5e0b784604b1352e98e7915c3c67d59ac4f709 (patch)
tree9aea1a07b72ba723eb15d177eae8e4e657322b68 /test
parentf95a2b2cda236f7c0e5ced2a4698e2b10d99fa53 (diff)
downloadpleroma-fe5e0b784604b1352e98e7915c3c67d59ac4f709.tar.gz
pleroma-fe5e0b784604b1352e98e7915c3c67d59ac4f709.zip
Mastodon API: Return `pleroma.direct_conversation_id` when creating direct messages (`POST /api/v1/statuses`)
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index fb04748bb..35a0d3fe1 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -296,7 +296,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
conn
|> post("api/v1/statuses", %{"status" => content, "visibility" => "direct"})
- assert %{"id" => id, "visibility" => "direct"} = json_response(conn, 200)
+ assert %{"id" => id} = response = json_response(conn, 200)
+ assert response["visibility"] == "direct"
+ assert response["pleroma"]["direct_conversation_id"]
assert activity = Activity.get_by_id(id)
assert activity.recipients == [user2.ap_id, conn.assigns[:user].ap_id]
assert activity.data["to"] == [user2.ap_id]