diff --git a/src/net/nl_api.c b/src/net/nl_api.c index 9e78be2..6116406 100644 --- a/src/net/nl_api.c +++ b/src/net/nl_api.c @@ -245,7 +245,6 @@ static void handle_info(const nl_api_ctx_t *ctx, nl_api_response_t *resp) cJSON_AddNullToObject(w, "error"); cJSON_AddNumberToObject(o, "uptime", in.uptime_s); cJSON_AddNumberToObject(o, "free_heap", in.free_heap); - cJSON_AddStringToObject(o, "reset_reason", "unknown"); if (in.last_ota_error) cJSON_AddStringToObject(o, "last_ota_error", in.last_ota_error); else diff --git a/test/test_api.c b/test/test_api.c index aedac44..cf79187 100644 --- a/test/test_api.c +++ b/test/test_api.c @@ -207,7 +207,7 @@ static void test_info_is_open(void) TEST_ASSERT_TRUE(cJSON_IsNull(cJSON_GetObjectItem(w, "error"))); TEST_ASSERT_EQUAL_INT(123, field("uptime")->valueint); TEST_ASSERT_EQUAL_INT(40000, field("free_heap")->valueint); - TEST_ASSERT_EQUAL_STRING("unknown", cJSON_GetStringValue(field("reset_reason"))); + TEST_ASSERT_NULL(cJSON_GetObjectItem(doc, "reset_reason")); TEST_ASSERT_TRUE(cJSON_IsNull(field("last_ota_error"))); }