diff options
author | Mark Felder <feld@feld.me> | 2021-02-11 15:07:21 -0600 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-02-11 15:07:21 -0600 |
commit | 333ff527fd44bce06b7c7e7450494ea929017b56 (patch) | |
tree | 66143d89ac66ca131117f4baefd4ca5bb8d6b734 | |
parent | c1d78328ee38fb2bc6c6f56c26588557f27365a9 (diff) | |
download | pleroma-333ff527fd44bce06b7c7e7450494ea929017b56.tar.gz |
Validate client application metadata is retained in the object
-rw-r--r-- | test/pleroma/web/mastodon_api/controllers/status_controller_test.exs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs index dcd1e6d5b..fada7c25c 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -357,6 +357,23 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do assert activity.data["to"] == [user2.ap_id] assert activity.data["cc"] == [] end + + test "preserves client application metadata", %{conn: conn} do + result = + conn + |> put_req_header("content-type", "application/json") + |> post("/api/v1/statuses", %{ + "status" => "cofe is my copilot" + }) + + assert %{ + "content" => "cofe is my copilot", + "application" => %{ + "name" => "Some client 0", + "website" => "https://example.com" + } + } = json_response_and_validate_schema(result, 200) + end end describe "posting scheduled statuses" do |