修复SetStatus错误
This commit is contained in:
@@ -51,79 +51,53 @@ func TestCaseBasicInfoLogic(t *testing.T) {
|
||||
if !result.Exists() {
|
||||
t.Error("type is not exists")
|
||||
}
|
||||
if result.Int() != 0 {
|
||||
t.Error("type != 0")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_order_status_email 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_order_status_email")
|
||||
if !result.Exists() {
|
||||
t.Error("is_order_status_email is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_order_status_email != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_email_advertisement 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_email_advertisement")
|
||||
if !result.Exists() {
|
||||
t.Error("is_email_advertisement is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_email_advertisement != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_order_status_phone 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_order_status_phone")
|
||||
if !result.Exists() {
|
||||
t.Error("is_order_status_phone is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_order_status_phone != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_phone_advertisement 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_phone_advertisement")
|
||||
if !result.Exists() {
|
||||
t.Error("is_phone_advertisement is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_phone_advertisement != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_open_render 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_open_render")
|
||||
if !result.Exists() {
|
||||
t.Error("is_open_render is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_open_render != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_thousand_face 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_thousand_face")
|
||||
if !result.Exists() {
|
||||
t.Error("is_thousand_face is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_thousand_face != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_low_rendering 字段是否存在,并且值是否为 false
|
||||
result = resp.Json().Get("data.is_low_rendering")
|
||||
if !result.Exists() {
|
||||
t.Error("is_low_rendering is not exists")
|
||||
}
|
||||
if result.Bool() != false {
|
||||
t.Error("is_low_rendering != false")
|
||||
}
|
||||
|
||||
// 检查返回值中的 is_remove_bg 字段是否存在,并且值是否为 true
|
||||
result = resp.Json().Get("data.is_remove_bg")
|
||||
if !result.Exists() {
|
||||
t.Error("is_remove_bg is not exists")
|
||||
}
|
||||
if result.Bool() != true {
|
||||
t.Error("is_remove_bg != true")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user