mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 10:05:57 +08:00
Fix 404 rendering, closes #1826
This commit is contained in:
parent
4f92ef8d02
commit
6ef803f95b
|
@ -5,7 +5,8 @@ config :livebook, LivebookWeb.Endpoint,
|
|||
url: [host: "localhost", path: "/"],
|
||||
pubsub_server: Livebook.PubSub,
|
||||
live_view: [signing_salt: "livebook"],
|
||||
drainer: [shutdown: 1000]
|
||||
drainer: [shutdown: 1000],
|
||||
render_errors: [formats: [html: LivebookWeb.ErrorHTML], layout: false]
|
||||
|
||||
# Configures Elixir's Logger
|
||||
config :logger, :console,
|
||||
|
|
12
test/livebook_web/controllers/errors_test.exs
Normal file
12
test/livebook_web/controllers/errors_test.exs
Normal file
|
@ -0,0 +1,12 @@
|
|||
defmodule LivebookWeb.ErrorsTest do
|
||||
use LivebookWeb.ConnCase, async: true
|
||||
|
||||
test "renders 404", %{conn: conn} do
|
||||
response = assert_error_sent :not_found, fn ->
|
||||
get(conn, "/this/does/not/exist")
|
||||
end
|
||||
|
||||
assert {404, _, body} = response
|
||||
assert body =~ "No Numbats here!"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue