add custom page LiveView with catch-all routing
Shop.CustomPage handles /:slug catch-all for CMS pages. Restructured router so the catch-all is last — all admin, auth, setup, and SEO routes defined before the shop scope to prevent interception. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,12 +9,13 @@ defmodule BerrypodWeb.Plugs.BrokenUrlTrackerTest do
|
||||
end
|
||||
|
||||
test "records broken URL on 404", %{conn: conn} do
|
||||
conn = get(conn, "/zz-nonexistent-path")
|
||||
# Multi-segment path — not caught by the /:slug catch-all route
|
||||
conn = get(conn, "/zz/nonexistent-path")
|
||||
|
||||
assert conn.status in [404, 500]
|
||||
|
||||
[broken_url] = Redirects.list_broken_urls()
|
||||
assert broken_url.path == "/zz-nonexistent-path"
|
||||
assert broken_url.path == "/zz/nonexistent-path"
|
||||
assert broken_url.recent_404_count == 1
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user