gophish/controllers/route_test.go

19 lines
294 B
Go
Raw Permalink Normal View History

2016-09-15 03:24:51 +00:00
package controllers
import (
"fmt"
"net/http"
"net/url"
)
func (s *ControllersSuite) TestLoginCSRF() {
resp, err := http.PostForm(fmt.Sprintf("%s/login", as.URL),
url.Values{
"username": {"admin"},
"password": {"gophish"},
})
s.Equal(resp.StatusCode, 403)
fmt.Println(err)
}