fix some code style and add checks to ci
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -6,8 +6,6 @@ defmodule EventosWeb.AccountControllerTest do
|
||||
alias Eventos.Accounts
|
||||
|
||||
@create_attrs %{description: "some description", display_name: "some display_name", domain: "some domain", private_key: "some private_key", public_key: "some public_key", suspended: true, uri: "some uri", url: "some url", username: "some username"}
|
||||
@update_attrs %{description: "some updated description", display_name: "some updated display_name", domain: "some updated domain", private_key: "some updated private_key", public_key: "some updated public_key", suspended: false, uri: "some updated uri", url: "some updated url", username: "some updated username"}
|
||||
@invalid_attrs %{description: nil, display_name: nil, domain: nil, private_key: nil, public_key: nil, suspended: nil, uri: nil, url: nil, username: nil}
|
||||
|
||||
def fixture(:account) do
|
||||
{:ok, account} = Accounts.create_account(@create_attrs)
|
||||
|
||||
@@ -7,7 +7,7 @@ defmodule EventosWeb.UserControllerTest do
|
||||
alias Eventos.Accounts.User
|
||||
|
||||
@create_attrs %{email: "foo@bar.tld", password: "some password_hash", username: "some username"}
|
||||
@update_attrs %{email: "foo@fighters.tld", password: "some updated password_hash", username: "some updated username"}
|
||||
# @update_attrs %{email: "foo@fighters.tld", password: "some updated password_hash", username: "some updated username"}
|
||||
@invalid_attrs %{email: "not an email", password: nil, username: nil}
|
||||
|
||||
def fixture(:user) do
|
||||
@@ -33,6 +33,7 @@ defmodule EventosWeb.UserControllerTest do
|
||||
test "renders user when data is valid", %{conn: conn} do
|
||||
conn = post conn, user_path(conn, :create), @create_attrs
|
||||
assert %{"user" => %{"id" => id}} = json_response(conn, 201)
|
||||
assert id > 0
|
||||
end
|
||||
|
||||
test "renders errors when data is invalid", %{conn: conn} do
|
||||
|
||||
Reference in New Issue
Block a user