diff --git a/internal/router/router_test.go b/internal/router/router_test.go index f88d17707..88eaa26a8 100644 --- a/internal/router/router_test.go +++ b/internal/router/router_test.go @@ -121,6 +121,19 @@ var routerGetTests = []struct { Method: "GET", CharmURL: "cs:win81/visualstudio-2012", }, +}, { + about: "wily id handler", + handlers: Handlers{ + Id: map[string]IdHandler{ + "foo": testIdHandler, + }, + }, + urlStr: "/wily/wordpress-34/foo", + expectStatus: http.StatusOK, + expectBody: idHandlerTestResp{ + Method: "GET", + CharmURL: "cs:wily/wordpress-34", + }, }, { about: "id handler with no series in id", handlers: Handlers{ @@ -200,6 +213,19 @@ var routerGetTests = []struct { Method: "GET", CharmURL: "cs:~joe/precise/wordpress-34", }, +}, { + about: "wily handler with user", + handlers: Handlers{ + Id: map[string]IdHandler{ + "foo": testIdHandler, + }, + }, + urlStr: "/~joe/wily/wordpress-34/foo", + expectStatus: http.StatusOK, + expectBody: idHandlerTestResp{ + Method: "GET", + CharmURL: "cs:~joe/wily/wordpress-34", + }, }, { about: "id handler with user and extra path", handlers: Handlers{