提交 7d4e2241 编写于 作者: G gaoxi

fail case update

Signed-off-by: Ngaoxi <gaoxi785@huawei.com>
上级 3b1996bf
...@@ -44,7 +44,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () { ...@@ -44,7 +44,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () {
http.request("https://httpbin.org/user-agent").then(function(data){ http.request("https://httpbin.org/user-agent").then(function(data){
console.info("NetStack "+ JSON.stringify(data)); console.info("NetStack "+ JSON.stringify(data));
expect(data.responseCode === NetHttp.ResponseCode.OK).assertTrue() expect(data.responseCode === NetHttp.ResponseCode.OK).assertTrue()
expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue(); expect(JSON.parse(data.result)["user-agent"] != undefined).assertTrue();
done(); done();
}) })
}); });
...@@ -174,7 +174,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () { ...@@ -174,7 +174,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () {
success : function(data){ success : function(data){
console.info("NetStack fetch success "+ JSON.stringify(data)) console.info("NetStack fetch success "+ JSON.stringify(data))
expect(data.code === 200).assertTrue() expect(data.code === 200).assertTrue()
expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue(); expect(JSON.parse(data.data)["user-agent"] != undefined).assertTrue()
done(); done();
}, },
fail : function(){ fail : function(){
...@@ -200,7 +200,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () { ...@@ -200,7 +200,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () {
success : function(data){ success : function(data){
console.info("NetStack fetch success "+ JSON.stringify(data)) console.info("NetStack fetch success "+ JSON.stringify(data))
expect(data.code === 200).assertTrue() expect(data.code === 200).assertTrue()
expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue(); expect(data.data["user-agent"] != undefined).assertTrue()
done(); done();
}, },
fail : function(){ fail : function(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册