OpenAPI: PleromaAPI UserImport Controller

This commit is contained in:
Haelwenn (lanodan) Monnier 2021-02-17 01:07:56 +01:00
parent 8866551b25
commit b4e0ae8a03
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
2 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@ defmodule Pleroma.Web.ApiSpec.UserImportOperation do
requestBody: request_body("Parameters", import_request(), required: true),
responses: %{
200 => ok_response(),
403 => Operation.response("Error", "application/json", ApiError),
500 => Operation.response("Error", "application/json", ApiError)
},
security: [%{"oAuth" => ["write:follow"]}]

View File

@ -81,9 +81,9 @@ defmodule Pleroma.Web.PleromaAPI.UserImportControllerTest do
if token == token3 do
assert %{"error" => "Insufficient permissions: follow | write:follows."} ==
json_response(conn, 403)
json_response_and_validate_schema(conn, 403)
else
assert json_response(conn, 200)
assert json_response_and_validate_schema(conn, 200)
end
end
end