Validate client application metadata is retained in the object
This commit is contained in:
parent
c1d78328ee
commit
333ff527fd
|
@ -357,6 +357,23 @@ test "posting a direct status", %{conn: conn} do
|
||||||
assert activity.data["to"] == [user2.ap_id]
|
assert activity.data["to"] == [user2.ap_id]
|
||||||
assert activity.data["cc"] == []
|
assert activity.data["cc"] == []
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
describe "posting scheduled statuses" do
|
describe "posting scheduled statuses" do
|
||||||
|
|
Loading…
Reference in New Issue