   defmodule Router do
     use Phoenix.Router
 
-    pipeline :browser do
-      plug :assigns
-    end
-
     scope "/" do
-      pipe_through :browser
       get "/stats", Controller, :stats
       forward "/admin", AdminDashboard
       scope "/internal" do
         forward "/api/v1", ApiRouter
       end
-    end
-
-    defp assigns(conn, _) do
-      Plug.Conn.assign(conn, :external_admin_page_path,
-                       AdminDashboard.Helpers.page_path(conn, :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

  end

  test "helpers cascade script name across forwards based on main router" do
    import AdminDashboard.Helpers
    assert page_path(%Plug.Conn{}, :stats) == "/stats"

    conn = call(Router, :get, "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"])
    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")
    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"])
    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
