OpenAPI: PleromaAPI UserImport Controller
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Wed, 17 Feb 2021 00:07:56 +0000 (01:07 +0100)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 15 Mar 2021 05:47:07 +0000 (06:47 +0100)
lib/pleroma/web/api_spec/operations/user_import_operation.ex
test/pleroma/web/pleroma_api/controllers/user_import_controller_test.exs

index 6292e20043773cc1ccc0f918ba2c9dd74b525675..8df19f1fc0340d6c9f2b6d97dfc21221b36d59b2 100644 (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"]}]
index 25a7f8374b38c6c1dfd0fec9aa6e8a2840628d95..d977bc3a22903a4104b75cb15a40770f6bed9bc6 100644 (file)
@@ -83,7 +83,7 @@ defmodule Pleroma.Web.PleromaAPI.UserImportControllerTest do
           assert %{"error" => "Insufficient permissions: follow | write:follows."} ==
                    json_response(conn, 403)
         else
-          assert json_response(conn, 200)
+          assert json_response_and_validate_schema(conn, 200)
         end
       end
     end