Skip to content

Commit

Permalink
Merge pull request #435 from urosj/v5-unstable
Browse files Browse the repository at this point in the history
* tests for wily in router
  • Loading branch information
jujugui committed Oct 12, 2015
2 parents 9f26620 + 85bcf94 commit 7f68671
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions internal/router/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 7f68671

Please sign in to comment.