A few more tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-11-28 10:49:16 +01:00
parent 3ddd5ee485
commit c9f58ea899
3 changed files with 15 additions and 3 deletions

View File

@@ -21,6 +21,11 @@ defmodule MobilizonWeb.WebFingerTest do
assert json_response(conn, 200) == WebFinger.represent_actor(actor)
end
test "GET /.well-known/webfinger with non existent actor", %{conn: conn} do
conn = get(conn, "/.well-known/webfinger?resource=acct:notme@localhost:4001")
assert response(conn, 404) == "Couldn't find user"
end
test "GET /.well-known/webfinger with no query", %{conn: conn} do
conn = get(conn, "/.well-known/webfinger")
assert response(conn, 400) == "No query provided"