   end
 
   test "helpers cascade script name across forwards based on main router" do
-    assert AdminDashboard.Helpers.page_path(%Plug.Conn{}, :stats) == "/stats"
+    import AdminDashboard.Helpers
+    assert page_path(%Plug.Conn{}, :stats) == "/stats"
 
     conn = call(Router, :get, "stats")
-    assert conn.assigns[:internal_admin_page_path] == "/admin/stats"
-    assert conn.assigns[:external_admin_page_path] == "/admin/stats"
+    fwd_conn = conn.assigns[:fwd_conn]
+    assert page_path(fwd_conn, :stats) == "/admin/stats"
+    assert page_path(conn, :stats) == "/admin/stats"
+
     conn = call(Router, :get, "stats", _params = nil, _headers = [], ["phx"])
-    assert conn.assigns[:internal_admin_page_path] == "/phx/admin/stats"
-    assert conn.assigns[:external_admin_page_path] == "/phx/admin/stats"
+    fwd_conn = conn.assigns[:fwd_conn]
+    assert page_path(fwd_conn, :stats) == "/phx/admin/stats"
+    assert page_path(conn, :stats) == "/phx/admin/stats"
 
     conn = call(Router, :get, "admin/stats")
-    assert conn.assigns[:internal_admin_page_path] == "/admin/stats"
-    assert conn.assigns[:external_admin_page_path] == "/admin/stats"
+    fwd_conn = conn.assigns[:fwd_conn]
+    assert page_path(fwd_conn, :stats) == "/admin/stats"
+    assert page_path(conn, :stats) == "/admin/stats"
+
     conn = call(Router, :get, "admin/stats", _params = nil, _headers = [], ["phx"])
-    assert conn.assigns[:internal_admin_page_path] == "/phx/admin/stats"
-    assert conn.assigns[:external_admin_page_path] == "/phx/admin/stats"
+    fwd_conn = conn.assigns[:fwd_conn]
+    assert page_path(fwd_conn, :stats) == "/phx/admin/stats"
+    assert page_path(conn, :stats) == "/phx/admin/stats"
   end
 end


  test "forwards path to plug" do
    conn = call(Router, :get, "admin")
    assert conn.script_name == []
    assert conn.assigns[:fwd_script_name] == ["admin"]
    assert conn.status == 200
    assert conn.resp_body == "admin index"
  end

  test "forwards any request starting with forward path" do
    conn = call(Router, :get, "admin/stats")
    assert conn.script_name == []
    assert conn.assigns[:fwd_script_name] == ["admin"]
    assert conn.status == 200
    assert conn.resp_body == "stats"
  end

  defmodule Router do
    use Phoenix.Router

    scope "/" do
      get "/stats", Controller, :stats
      forward "/admin", AdminDashboard
      scope "/internal" do
        forward "/api/v1", ApiRouter
      end
    end
  end

