updated test status codes to 2xx due to go 1.26.0 stricter checks
This commit is contained in:
@@ -354,19 +354,19 @@ func TestEventString(t *testing.T) {
|
|||||||
scenarios := []testResponseWriteScenario[string]{
|
scenarios := []testResponseWriteScenario[string]{
|
||||||
{
|
{
|
||||||
name: "no explicit content-type",
|
name: "no explicit content-type",
|
||||||
status: 123,
|
status: 234,
|
||||||
headers: nil,
|
headers: nil,
|
||||||
body: "test",
|
body: "test",
|
||||||
expectedStatus: 123,
|
expectedStatus: 234,
|
||||||
expectedHeaders: map[string]string{"content-type": "text/plain; charset=utf-8"},
|
expectedHeaders: map[string]string{"content-type": "text/plain; charset=utf-8"},
|
||||||
expectedBody: "test",
|
expectedBody: "test",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "with explicit content-type",
|
name: "with explicit content-type",
|
||||||
status: 123,
|
status: 234,
|
||||||
headers: map[string]string{"content-type": "text/test"},
|
headers: map[string]string{"content-type": "text/test"},
|
||||||
body: "test",
|
body: "test",
|
||||||
expectedStatus: 123,
|
expectedStatus: 234,
|
||||||
expectedHeaders: map[string]string{"content-type": "text/test"},
|
expectedHeaders: map[string]string{"content-type": "text/test"},
|
||||||
expectedBody: "test",
|
expectedBody: "test",
|
||||||
},
|
},
|
||||||
@@ -383,19 +383,19 @@ func TestEventHTML(t *testing.T) {
|
|||||||
scenarios := []testResponseWriteScenario[string]{
|
scenarios := []testResponseWriteScenario[string]{
|
||||||
{
|
{
|
||||||
name: "no explicit content-type",
|
name: "no explicit content-type",
|
||||||
status: 123,
|
status: 234,
|
||||||
headers: nil,
|
headers: nil,
|
||||||
body: "test",
|
body: "test",
|
||||||
expectedStatus: 123,
|
expectedStatus: 234,
|
||||||
expectedHeaders: map[string]string{"content-type": "text/html; charset=utf-8"},
|
expectedHeaders: map[string]string{"content-type": "text/html; charset=utf-8"},
|
||||||
expectedBody: "test",
|
expectedBody: "test",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "with explicit content-type",
|
name: "with explicit content-type",
|
||||||
status: 123,
|
status: 234,
|
||||||
headers: map[string]string{"content-type": "text/test"},
|
headers: map[string]string{"content-type": "text/test"},
|
||||||
body: "test",
|
body: "test",
|
||||||
expectedStatus: 123,
|
expectedStatus: 234,
|
||||||
expectedHeaders: map[string]string{"content-type": "text/test"},
|
expectedHeaders: map[string]string{"content-type": "text/test"},
|
||||||
expectedBody: "test",
|
expectedBody: "test",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user