1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Underscoring unnecessary variables on CSRF test (#836)

This commit is contained in:
Diego Siqueira 2017-04-01 13:29:12 -03:00 committed by Vishal Rana
parent 07ee93a14d
commit d67c6f029c

View File

@ -61,7 +61,7 @@ func TestCSRFTokenFromForm(t *testing.T) {
if assert.NoError(t, err) {
assert.Equal(t, "token", token)
}
token, err = csrfTokenFromForm("invalid")(c)
_, err = csrfTokenFromForm("invalid")(c)
assert.Error(t, err)
}
@ -76,7 +76,7 @@ func TestCSRFTokenFromQuery(t *testing.T) {
if assert.NoError(t, err) {
assert.Equal(t, "token", token)
}
token, err = csrfTokenFromQuery("invalid")(c)
_, err = csrfTokenFromQuery("invalid")(c)
assert.Error(t, err)
csrfTokenFromQuery("csrf")
}