towerops/test/towerops_web/controllers/health_controller_test.exs
Graham McIntire 03ec909e3a test: add LiveView tests following testing-liveview patterns
Apply Testing LiveView course patterns (live/2, has_element?,
render_click, form/3). Add tests for MobileQRLive, WeathermapLive,
StatusPageLive, controllers, plugs, and pure function modules.
Expand proto decode coverage to 85.24%.
2026-05-07 12:55:39 -05:00

13 lines
388 B
Elixir

defmodule ToweropsWeb.HealthControllerTest do
use ToweropsWeb.ConnCase, async: true
describe "GET /health" do
test "returns 200 when database is connected", %{conn: conn} do
conn = get(conn, "/health")
body = response(conn, 200)
result = Jason.decode!(body)
assert result["status"] == "ok"
assert result["database"] == "connected"
end
end
end