When unit testing controllers that use match to redirect requests to a custom router,
the unit tests still reference the main Application Router and return 404.
I've been able to override the default router behavior for Verified Routes using
use Phoenix.VerifiedRoutes,
router: AppWeb.Admin.Router,
endpoint: AppWeb.Endpoint
Expected behavior
The Router should redirect requests to the correct Router, or be able to override the router in the CaseTemplate setup.
Controllers do requests through the endpoint. The router does not matter. Or please provide more context on what you are trying to achieve, but none of those should be hardcoded.
Environment
Actual behavior
When unit testing controllers that use
match
to redirect requests to a custom router, the unit tests still reference the main Application Router and return 404.I've been able to override the default router behavior for Verified Routes using
Expected behavior
The Router should redirect requests to the correct Router, or be able to override the router in the CaseTemplate setup.