From e8a1a1f51da0221173203272a78c7996c319b50a Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 5 Jul 2022 11:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95shop=20buy=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/shop/module_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/shop/module_test.go b/modules/shop/module_test.go index c05ab499b..52074fbf2 100644 --- a/modules/shop/module_test.go +++ b/modules/shop/module_test.go @@ -89,3 +89,11 @@ func Test_Module_APIGetList(t *testing.T) { s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "getlist", Message: data}, reply) log.Debugf("reply:%v", reply) } + +//测试api_buy +func Test_Module_APIBuy(t *testing.T) { + data, _ := ptypes.MarshalAny(&pb.ShopBuyReq{GoodsId: 7}) + reply := &pb.RPCMessageReply{} + s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "buy", Message: data}, reply) + log.Debugf("reply:%v", reply) +}