Provide metrics on root URL

This commit is contained in:
2022-02-20 22:47:48 +01:00
parent 79e83afafb
commit c8a043528b
23 changed files with 869 additions and 127 deletions

View File

@@ -0,0 +1,17 @@
defmodule KafkaexLagExporterWeb.ErrorViewTest do
use KafkaexLagExporterWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(KafkaexLagExporterWeb.ErrorView, "404.json", []) == %{
errors: %{detail: "Not Found"}
}
end
test "renders 500.json" do
assert render(KafkaexLagExporterWeb.ErrorView, "500.json", []) ==
%{errors: %{detail: "Internal Server Error"}}
end
end