mirror of
https://github.com/kataras/iris.git
synced 2025-03-13 21:36:28 +01:00
Ok finish the context's tests
This commit is contained in:
parent
728cba60f7
commit
f5f7f22245
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user