Fix posts and rework graphql errors

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-10-01 15:07:15 +02:00
parent 92367a5f33
commit aced4d039b
69 changed files with 1795 additions and 999 deletions

View File

@@ -367,7 +367,7 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
conn
|> post("/api", AbsintheHelpers.mutation_skeleton(mutation))
assert hd(json_response(res, 200)["errors"])["message"] == "This email is already used."
assert hd(json_response(res, 200)["errors"])["message"] == ["This email is already used."]
end
test "create_user/3 doesn't allow registration when registration is closed", %{conn: conn} do
@@ -614,7 +614,7 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
|> post("/api", AbsintheHelpers.mutation_skeleton(mutation))
assert hd(json_response(res, 200)["errors"])["message"] ==
"Email doesn't fit required format"
["Email doesn't fit required format"]
end
end