Fix failure status bug: when status is failure, request should be stopped
Change-Id: I699d9ae6bdc34ac67d9a8b3c69e9d789f9709c6d
diff --git a/tests/unit-tests/json-helper.t.cpp b/tests/unit-tests/json-helper.t.cpp
index 266d3ee..b089e4e 100644
--- a/tests/unit-tests/json-helper.t.cpp
+++ b/tests/unit-tests/json-helper.t.cpp
@@ -67,11 +67,12 @@
BOOST_CHECK_EQUAL(result.get<std::string>(JSON_CERTIFICATE), "/ndn/test");
}
-BOOST_AUTO_TEST_CASE(GenerateErrorJson)
+BOOST_AUTO_TEST_CASE(GenerateFailureJson)
{
- auto result = genErrorJson("The certificate name already exists");
- BOOST_CHECK_EQUAL(result.get<std::string>(JSON_STATUS), "error");
- BOOST_CHECK_EQUAL(result.get<std::string>(JSON_ERROR_INFO),
+ auto result = genFailureJson("598234759", "EMAIL", "failure",
+ "The certificate name already exists");
+ BOOST_CHECK_EQUAL(result.get<std::string>(JSON_STATUS), "failure");
+ BOOST_CHECK_EQUAL(result.get<std::string>(JSON_FAILURE_INFO),
"The certificate name already exists");
}