diff --git a/resources/views/admin/index.tmpl b/resources/views/admin/index.tmpl index 009caa5..5046cfe 100644 --- a/resources/views/admin/index.tmpl +++ b/resources/views/admin/index.tmpl @@ -2,5 +2,6 @@ {{ template "admin/header.tmpl" . }}
Hello, {{ .name }}
CSRF Token: {{ .csrf_token }}
+CSRF Field: {{ .csrf_field }}
{{ template "admin/footer.tmpl" . }} {{ end }} \ No newline at end of file diff --git a/tests/feature/http_test.go b/tests/feature/http_test.go index 61ce095..9acd215 100644 --- a/tests/feature/http_test.go +++ b/tests/feature/http_test.go @@ -377,7 +377,7 @@ func (s *HttpTestSuite) TestView() { csrfToken := resp.Headers().Get("X-CSRF-TOKEN") s.NotEmpty(csrfToken) - s.Equal(context, fmt.Sprintf("\n \n\n \nI'm the header
\n\nHello, Goravel
\nCSRF Token: %s
\n \nI'm the footer
\n \n\n\n", csrfToken)) + s.Equal(context, fmt.Sprintf("\n \n\n \nI'm the header
\n\nHello, Goravel
\nCSRF Token: %s
\nCSRF Field:
\n \nI'm the footer
\n \n\n\n", csrfToken, csrfToken)) } func (s *HttpTestSuite) TestProviderRoute() {