X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsupport%2Fconn_case.ex;h=eab46983391fb17415dbd82cfe1140f25541416e;hb=refs%2Fheads%2Fdevelop;hp=953aa010abccb094762261c0fe7b8a118af7e5ec;hpb=3aa25b008d145bc7bfda907bca3b327753380728;p=akkoma diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index 953aa010a..eab469833 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -67,13 +67,11 @@ defmodule Pleroma.Web.ConnCase do end defp json_response_and_validate_schema( - %{ - private: %{ - open_api_spex: %{operation_id: op_id, operation_lookup: lookup, spec: spec} - } - } = conn, + %{private: %{operation_id: op_id}} = conn, status ) do + {spec, lookup} = OpenApiSpex.Plug.PutApiSpec.get_spec_and_operation_lookup(conn) + content_type = conn |> Plug.Conn.get_resp_header("content-type") @@ -104,9 +102,7 @@ defmodule Pleroma.Web.ConnCase do end) flunk( - "Response does not conform to schema of #{op_id} operation: #{ - Enum.join(errors, "\n") - }\n#{inspect(json)}" + "Response does not conform to schema of #{op_id} operation: #{Enum.join(errors, "\n")}\n#{inspect(json)}" ) end end