towerops/test/towerops_web/controllers/health_controller_test.exs
2026-01-14 13:54:48 -06:00

17 lines
504 B
Elixir

defmodule ToweropsWeb.HealthControllerTest do
use ToweropsWeb.ConnCase, async: true
describe "GET /health" do
test "returns ok with database connectivity check", %{conn: conn} do
conn = get(conn, ~p"/health")
assert json_response(conn, 200) == %{
"status" => "ok",
"database" => "connected",
"version" => "0.1.0"
}
assert get_resp_header(conn, "content-type") == ["application/json; charset=utf-8"]
end
end
end