aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-04-17 19:27:22 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-04-17 19:27:22 +0400
commit163341857a726e8d74b6ddcd1230579e4c36a1b5 (patch)
treecace60087056a7739ae035a4dc13ade40805a8d1 /test
parent65f04b7806e342ed8967e5fa760e1509a776036e (diff)
downloadpleroma-163341857a726e8d74b6ddcd1230579e4c36a1b5.tar.gz
Improve OpenAPI errors
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index 86136f7e4..133d7f642 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -952,7 +952,16 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|> post("/api/v1/accounts", Map.delete(valid_params, attr))
|> json_response(400)
- assert res == %{"error" => "Missing parameters"}
+ assert res == %{
+ "error" => "Missing field: #{attr}.",
+ "errors" => [
+ %{
+ "message" => "Missing field: #{attr}",
+ "source" => %{"pointer" => "/#{attr}"},
+ "title" => "Invalid value"
+ }
+ ]
+ }
end)
end