Skip to content

Commit

Permalink
switch it
Browse files Browse the repository at this point in the history
  • Loading branch information
hyorigo committed Mar 18, 2024
1 parent b5a73ef commit dbfabb9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/http/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@ func TestServerResponse(t *testing.T) {
invalid status code
`),
},
{
name: "status code 101",
script: itn.HereDoc(`
response.set_code(101)
response.set_text('Switch')
`),
request: getMockRequest(bd),
expectedStatus: http.StatusSwitchingProtocols,
expectedResponse: itn.HereDoc(`
Content-Type: text/plain
Switch
`),
},
{
name: "invalid json",
script: itn.HereDoc(`
Expand Down

0 comments on commit dbfabb9

Please sign in to comment.