1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 03:47:04 +00:00

Update to 6.0.1 - use the response recorder whenever you need it. Read HISTORY.md

This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-01-04 15:16:53 +02:00
parent 8bbd9f8fc5
commit 058d70e533
12 changed files with 531 additions and 210 deletions

View File

@@ -331,7 +331,7 @@ func TestMuxSimple(t *testing.T) {
iris.HandleFunc(r.Method, r.Path, func(ctx *iris.Context) {
ctx.SetStatusCode(r.Status)
if r.Params != nil && len(r.Params) > 0 {
ctx.SetBodyString(ctx.ParamsSentence())
ctx.WriteString(ctx.ParamsSentence())
} else if r.URLParams != nil && len(r.URLParams) > 0 {
if len(r.URLParams) != len(ctx.URLParams()) {
t.Fatalf("Error when comparing length of url parameters %d != %d", len(r.URLParams), len(ctx.URLParams()))
@@ -344,9 +344,9 @@ func TestMuxSimple(t *testing.T) {
paramsKeyVal = paramsKeyVal[0 : len(paramsKeyVal)-1]
}
}
ctx.SetBodyString(paramsKeyVal)
ctx.WriteString(paramsKeyVal)
} else {
ctx.SetBodyString(r.Body)
ctx.WriteString(r.Body)
}
})