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