projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix_flaky_transfer_task_test.exs (#237)
[akkoma]
/
test
/
support
/
conn_case.ex
diff --git
a/test/support/conn_case.ex
b/test/support/conn_case.ex
index 953aa010abccb094762261c0fe7b8a118af7e5ec..eab46983391fb17415dbd82cfe1140f25541416e 100644
(file)
--- 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(
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
status
) do
+ {spec, lookup} = OpenApiSpex.Plug.PutApiSpec.get_spec_and_operation_lookup(conn)
+
content_type =
conn
|> Plug.Conn.get_resp_header("content-type")
content_type =
conn
|> Plug.Conn.get_resp_header("content-type")
@@
-104,9
+102,7
@@
defmodule Pleroma.Web.ConnCase do
end)
flunk(
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
)
end
end