commit: b2b332984c42d4be8f5d4890e53faa09c44a4fb2
parent: 344a9b28b31960ed13987da3d806881f1179000b
Author: lain <lain@soykaf.club>
Date: Mon, 29 Jun 2020 15:59:40 +0000
Merge branch 'fix/cast-and-validate' into 'develop'
Fix CastAndValidate plug
Closes #1889
See merge request pleroma/pleroma!2704
Diffstat:
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/pleroma/web/api_spec/cast_and_validate.ex b/lib/pleroma/web/api_spec/cast_and_validate.ex
@@ -40,7 +40,7 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do
|> List.first()
_ ->
- nil
+ "application/json"
end
private_data = Map.put(private_data, :operation_id, operation_id)
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -780,7 +780,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{"id" => _id, "muting" => true, "muting_notifications" => true} =
conn
- |> put_req_header("content-type", "application/json")
|> post("/api/v1/accounts/#{other_user.id}/mute")
|> json_response_and_validate_schema(200)