Test both ingestion of post in the status controller and the correct response during the view

This commit is contained in:
Mark Felder 2021-03-02 12:29:16 -06:00
parent 85b2387f66
commit f0208980e4
1 changed files with 11 additions and 0 deletions

View File

@ -376,6 +376,17 @@ test "discloses application metadata when enabled" do
"status" => "cofe is my copilot" "status" => "cofe is my copilot"
}) })
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 %{ assert %{
"content" => "cofe is my copilot", "content" => "cofe is my copilot",
"application" => %{ "application" => %{