aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2021-03-02 18:40:35 +0000
committerfeld <feld@feld.me>2021-03-02 18:40:35 +0000
commit210aa42f74494864d70f97711204938cbcc4a19a (patch)
tree8b02ab27234f69243a03a7132f1730177cfbf5fc /test
parent4cb166e979ea66a1c79995dacacbcf44fbf7365f (diff)
parentccbf162088951e4b7f28291ca4cd9b9280b40857 (diff)
downloadpleroma-210aa42f74494864d70f97711204938cbcc4a19a.tar.gz
Merge branch 'application-to-generator' into 'develop'
Status application field: test improvements See merge request pleroma/pleroma!3356
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/mastodon_api/controllers/status_controller_test.exs21
1 files changed, 21 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..39ab90ba6 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,
@@ -396,6 +407,16 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
"status" => "club mate is my wingman"
})
+ assert %{"content" => "club mate is my wingman"} =
+ 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" => "club mate is my wingman",
"application" => nil