mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
new 'Party.DI()' method to return the Party's instance of the new 'APIBuilderDI' and move the DI-relative Router to this new APIBuilderDI
Former-commit-id: 2fb81406c6e3162991c90e0918a3cac1b77c2b54
This commit is contained in:
@@ -221,15 +221,15 @@ func TestHandlerPathParams(t *testing.T) {
|
||||
}
|
||||
|
||||
app.PartyFunc("/users", func(r iris.Party) {
|
||||
r.HandleFunc(iris.MethodGet, "/{id:uint64}", handler)
|
||||
r.DI().Get("/{id:uint64}", handler)
|
||||
})
|
||||
|
||||
app.PartyFunc("/editors/{id:uint64}", func(r iris.Party) {
|
||||
r.HandleFunc(iris.MethodGet, "/", handler)
|
||||
r.DI().Get("/", handler)
|
||||
})
|
||||
|
||||
// should receive the last one, as we expected only one useful for MVC (there is a similar test there too).
|
||||
app.HandleFunc(iris.MethodGet, "/{ownerID:uint64}/book/{booKID:uint64}", handler)
|
||||
app.DI().Get("/{ownerID:uint64}/book/{booKID:uint64}", handler)
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user