diff options
author | Mark Felder <feld@feld.me> | 2021-03-02 12:29:16 -0600 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-03-02 12:29:16 -0600 |
commit | f0208980e48ee361f9eaa40352f519a1b95ace28 (patch) | |
tree | 4c0dfb8af53839fb5eacf42882757c1d475fee91 | |
parent | 85b2387f665045a303486d10e6879a46a7ab922e (diff) | |
download | pleroma-f0208980e48ee361f9eaa40352f519a1b95ace28.tar.gz |
Test both ingestion of post in the status controller and the correct response during the view
-rw-r--r-- | test/pleroma/web/mastodon_api/controllers/status_controller_test.exs | 11 |
1 files changed, 11 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 bd385bccd..634ebf79c 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -377,6 +377,17 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do }) assert %{ + "content" => "cofe is my copilot" + } = json_response_and_validate_schema(result, 200) + + activity = result.assigns.activity.id + + result = + conn + |> put_req_header("content-type", "application/json") + |> get("api/v1/statuses/#{activity}") + + assert %{ "content" => "cofe is my copilot", "application" => %{ "name" => ^app_name, |