Ok finish the context's tests

This commit is contained in:
Makis Maropoulos 2016-07-07 01:26:05 +02:00
parent 728cba60f7
commit f5f7f22245
2 changed files with 10 additions and 0 deletions

View File

@ -66,9 +66,11 @@ type (
GetString(string) string
GetInt(string) int
Set(string, interface{})
VisitAllCookies(func(string, string))
SetCookie(*fasthttp.Cookie)
SetCookieKV(string, string)
RemoveCookie(string)
GetFlashes() map[string]string
GetFlash(string) (string, error)
SetFlash(string, string)
Session() store.IStore

View File

@ -1,5 +1,12 @@
package iris
/* The most part of the context covered,
the other part contains serving static methods,
find remote ip and GetInt,
I am not waiting unexpected behaviors from the rest of the funcs,
so that's all with context's tests.
*/
import (
"encoding/xml"
"net/url"
@ -308,6 +315,7 @@ func TestContextRedirectTo(t *testing.T) {
//println("Redirecting to: " + routeName + " with path: " + Path(routeName, args...))
ctx.RedirectTo(routeName, args...)
})
e := Tester(t)
e.GET("/redirect/to/my-path/").Expect().Status(StatusOK).Body().Equal("/mypath")