Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (15 sloc) 446 Bytes
package main
import (
"testing"
"github.com/kataras/iris/httptest"
)
func TestMVCSession(t *testing.T) {
e := httptest.New(t, newApp(), httptest.URL("http://example.com"))
e1 := e.GET("/").Expect().Status(httptest.StatusOK)
e1.Cookies().NotEmpty()
e1.Body().Contains("1 visit")
e.GET("/").Expect().Status(httptest.StatusOK).
Body().Contains("2 visit")
e.GET("/").Expect().Status(httptest.StatusOK).
Body().Contains("3 visit")
}
You can’t perform that action at this time.