add test for 'send' command

This commit is contained in:
proddy
2021-10-20 09:21:12 +02:00
parent 4f47712d52
commit b3472c3919
2 changed files with 10 additions and 3 deletions

View File

@@ -1030,6 +1030,13 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {
request.url("/api"); request.url("/api");
EMSESP::webAPIService.webAPIService_post(&request, json); EMSESP::webAPIService.webAPIService_post(&request, json);
// 4 - system call
char data4[] = "{\"value\":\"0B 88 19 19 02\"}";
deserializeJson(doc, data4);
json = doc.as<JsonVariant>();
request.url("/api/system/send");
EMSESP::webAPIService.webAPIService_post(&request, json);
#endif #endif
} }

View File

@@ -39,9 +39,9 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "shower_alert" // #define EMSESP_DEBUG_DEFAULT "shower_alert"
// #define EMSESP_DEBUG_DEFAULT "310" // #define EMSESP_DEBUG_DEFAULT "310"
// #define EMSESP_DEBUG_DEFAULT "render" // #define EMSESP_DEBUG_DEFAULT "render"
// #define EMSESP_DEBUG_DEFAULT "api" #define EMSESP_DEBUG_DEFAULT "api"
// #define EMSESP_DEBUG_DEFAULT "crash" // #define EMSESP_DEBUG_DEFAULT "crash"
#define EMSESP_DEBUG_DEFAULT "mqtt_individual" // #define EMSESP_DEBUG_DEFAULT "mqtt_individual"
class Test { class Test {
public: public: