fix some code style and add checks to ci

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-01-14 17:56:50 +01:00
parent fc89c563ec
commit 1217361b6c
64 changed files with 242 additions and 108 deletions

View File

@@ -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