Add start of controller testing
This commit is contained in:
parent
598af7a884
commit
096c99df92
14 changed files with 106 additions and 87 deletions
|
@ -40,4 +40,12 @@ defmodule MatrixServerWeb.ConnCase do
|
|||
|
||||
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
||||
end
|
||||
|
||||
defmacro post_json(conn, path, params) do
|
||||
quote do
|
||||
unquote(conn)
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post(unquote(path), Jason.encode!(unquote(params)))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue