blob: cbbd0155945f8b5b3008a11be2cc333dbd8c495a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
defmodule MatrixAppServiceWeb.UserControllerTest do
use MatrixAppServiceWeb.ConnCase
describe "query" do
@tag authenticated: true
test "querying an existing user returns 200", %{conn: conn} do
conn = get(conn, Routes.matrix_user_path(conn, :query, "@existing:homeserver"), conn.params)
assert json_response(conn, 200) == "{}"
end
@tag authenticated: true
test "querying an non-existing user returns 404", %{conn: conn} do
conn =
get(conn, Routes.matrix_user_path(conn, :query, "@non-existing:homeserver"), conn.params)
assert json_response(conn, 404) == ""
end
end
end
|