X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fmastodon_api%2Fcontrollers%2Fstatus_controller_test.exs;h=634ebf79cad2fbbfc724c8da3d853951d44669b3;hb=f0208980e48ee361f9eaa40352f519a1b95ace28;hp=dd2f306b793e2d5a5af936464fbb6e00b671d897;hpb=4a9d3a1f28bb89d534a859562a5209543650de9c;p=akkoma 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 dd2f306b7..634ebf79c 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -364,8 +364,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do %Pleroma.Web.OAuth.Token{ app: %Pleroma.Web.OAuth.App{ - client_name: _app_name, - website: _app_website + client_name: app_name, + website: app_website } } = token @@ -376,11 +376,22 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do "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 %{ "content" => "cofe is my copilot", "application" => %{ - "name" => app_name, - "website" => app_website + "name" => ^app_name, + "website" => ^app_website } } = json_response_and_validate_schema(result, 200) end