fix #1240: losing host port in har2case

This commit is contained in:
debugtalk
2022-05-03 10:46:05 +08:00
parent fbf236c62f
commit ed4aa4c5b7
3 changed files with 19 additions and 1 deletions
+17
View File
@@ -142,6 +142,23 @@ func TestGetFilenameWithoutExtension(t *testing.T) {
}
}
func TestMakeRequestURL(t *testing.T) {
har := NewHAR("")
entry := &Entry{
Request: Request{
URL: "http://127.0.0.1:8080/api/login",
},
}
step, err := har.prepareTestStep(entry)
if !assert.NoError(t, err) {
t.Fatal()
}
if !assert.Equal(t, "http://127.0.0.1:8080/api/login", step.Request.URL) {
t.Fatal()
}
}
func TestMakeRequestHeaders(t *testing.T) {
har := NewHAR("")
entry := &Entry{