增加气站合同附件受控上传与预览
This commit is contained in:
@@ -100,3 +100,23 @@ func TestGasAvatarRoutes(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestGasContractAttachmentRoutes 验证合同附件通过气站鉴权域提供专用接口。
|
||||
func TestGasContractAttachmentRoutes(t *testing.T) {
|
||||
gin.SetMode(gin.TestMode)
|
||||
engine := gin.New()
|
||||
RegisterGas("heqi", engine)
|
||||
routes := map[string]bool{}
|
||||
for _, route := range engine.Routes() {
|
||||
routes[route.Method+" "+route.Path] = true
|
||||
}
|
||||
for _, path := range []string{
|
||||
"POST /heqi/gas/v1/gasorder_contract/attachment/upload",
|
||||
"POST /heqi/gas/v1/gasorder_contract/attachment/cleanup",
|
||||
"GET /heqi/gas/v1/gasorder_contract/:identity/attachment",
|
||||
} {
|
||||
if !routes[path] {
|
||||
t.Fatalf("missing gas contract attachment route %s", path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user