bugfix: deal with empty base_url

This commit is contained in:
buyuxiang
2022-05-30 20:56:11 +08:00
parent 8ed2f84cf5
commit 4f855de419
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ func TestMakeTestCaseFromHAR(t *testing.T) {
if !assert.Equal(t, map[string]interface{}{"foo1": "HDnY8", "foo2": 12.3}, tCase.TestSteps[1].Request.Body) {
t.Fatal()
}
if !assert.Equal(t, "foo1=HDnY8&foo2=12.3", tCase.TestSteps[2].Request.Body) {
if !assert.Equal(t, map[string]string{"foo1": "HDnY8", "foo2": "12.3"}, tCase.TestSteps[2].Request.Body) {
t.Fatal()
}
@@ -264,7 +264,7 @@ func TestMakeRequestDataParams(t *testing.T) {
t.Fatal()
}
if !assert.Equal(t, "a=1&b=2", step.Request.Body) {
if !assert.Equal(t, map[string]string{"a": "1", "b": "2"}, step.Request.Body) {
t.Fatal()
}
}