Skip to content

Commit

Permalink
Update test assertions to expect 405 status code for POST requests
Browse files Browse the repository at this point in the history
Signed-off-by: HAHWUL <[email protected]>
  • Loading branch information
hahwul committed Dec 1, 2024
1 parent bec9bf5 commit d7904b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/har/har_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func TestSinglePostJSONRequest(t *testing.T) {
resp, err := c.Post("https://example.com", "application/json", buff)
require.NoError(t, err)
assert.NotNil(t, resp)
assert.Equal(t, 200, resp.StatusCode)
assert.Equal(t, 405, resp.StatusCode)

err = hw.Close()
require.NoError(t, err)
Expand All @@ -162,7 +162,7 @@ func TestSinglePostFormRequest(t *testing.T) {

require.NoError(t, err)
assert.NotNil(t, resp)
assert.Equal(t, 200, resp.StatusCode)
assert.Equal(t, 405, resp.StatusCode)

err = hw.Close()
require.NoError(t, err)
Expand Down

0 comments on commit d7904b2

Please sign in to comment.