Test for redirect

This commit is contained in:
Alex Myasoedov 2018-01-18 20:15:19 -05:00
parent 4e0b63b38b
commit f6dc3a04e3
No known key found for this signature in database
GPG key ID: D261413C245982F0

View file

@ -34,10 +34,10 @@ func Test(t *testing.T) {
g.Describe("App api", func() {
var cookie string
g.It("Should return 200 on / ", func() {
g.It("Should return 302 on / to redirect to file name ", func() {
w := client("GET", "/", "")
g.Assert(w.Code).Equal(200)
g.Assert(w.Code).Equal(302)
cookie = w.HeaderMap.Get(Cookie)
})