blob: ffa07153523faa86aed6511b11e3f212111e7e4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package acceptance_test
import (
"net/http"
"testing"
"github.com/stretchr/testify/require"
)
func TestUnknownHTTPMethod(t *testing.T) {
teardown := RunPagesProcess(t, *pagesBinary, supportedListeners(), "")
defer teardown()
req, err := http.NewRequest("UNKNOWN", httpListener.URL(""), nil)
require.NoError(t, err)
req.Host = ""
resp, err := DoPagesRequest(t, httpListener, req)
require.NoError(t, err)
require.Equal(t, http.StatusMethodNotAllowed, resp.StatusCode)
}
|