Make tests great again !
(Also use only one field for public/private key pem) Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -16,8 +16,8 @@ defmodule EventosWeb.AddressControllerTest do
|
||||
end
|
||||
|
||||
setup %{conn: conn} do
|
||||
account = insert(:account)
|
||||
user = insert(:user, account: account)
|
||||
actor = insert(:actor)
|
||||
user = insert(:user, actor: actor)
|
||||
{:ok, conn: conn, user: user}
|
||||
end
|
||||
|
||||
@@ -101,11 +101,4 @@ defmodule EventosWeb.AddressControllerTest do
|
||||
defp create_address(_) do
|
||||
{:ok, address: insert(:address)}
|
||||
end
|
||||
|
||||
defp auth_conn(conn, %Eventos.Accounts.User{} = user) do
|
||||
{:ok, token, _claims} = EventosWeb.Guardian.encode_and_sign(user)
|
||||
conn
|
||||
|> put_req_header("authorization", "Bearer #{token}")
|
||||
|> put_req_header("accept", "application/json")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user