1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

Use pagewriter to render robots txt page

This commit is contained in:
Joel Speed
2021-03-13 09:55:54 +00:00
parent 9782fc7fa4
commit f3bd61b371
2 changed files with 2 additions and 8 deletions

View File

@ -57,7 +57,7 @@ func TestRobotsTxt(t *testing.T) {
req, _ := http.NewRequest("GET", "/robots.txt", nil)
proxy.ServeHTTP(rw, req)
assert.Equal(t, 200, rw.Code)
assert.Equal(t, "User-agent: *\nDisallow: /", rw.Body.String())
assert.Equal(t, "User-agent: *\nDisallow: /\n", rw.Body.String())
}
func TestIsValidRedirect(t *testing.T) {