mirror of
https://github.com/kataras/iris.git
synced 2026-01-05 19:27:05 +00:00
.DI() to ConfigureContainer(...builders)
Former-commit-id: 169671a8b5b706dc8f136e68c1a060f27a2c421b
This commit is contained in:
@@ -220,16 +220,16 @@ func TestHandlerPathParams(t *testing.T) {
|
||||
return fmt.Sprintf("%d", id)
|
||||
}
|
||||
|
||||
app.PartyFunc("/users", func(r iris.Party) {
|
||||
r.DI().Get("/{id:uint64}", handler)
|
||||
app.Party("/users").ConfigureContainer(func(api *iris.APIContainer) {
|
||||
api.Get("/{id:uint64}", handler)
|
||||
})
|
||||
|
||||
app.PartyFunc("/editors/{id:uint64}", func(r iris.Party) {
|
||||
r.DI().Get("/", handler)
|
||||
app.Party("/editors/{id:uint64}").ConfigureContainer(func(api *iris.APIContainer) {
|
||||
api.Get("/", handler)
|
||||
})
|
||||
|
||||
// should receive the last one, as we expected only one useful for MVC (there is a similar test there too).
|
||||
app.DI().Get("/{ownerID:uint64}/book/{booKID:uint64}", handler)
|
||||
app.ConfigureContainer().Get("/{ownerID:uint64}/book/{booKID:uint64}", handler)
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user