First start of MQTT buttons

This commit is contained in:
Pim van Pelt
2017-12-02 16:51:09 +01:00
parent c315de560f
commit b8e5637c8b
9 changed files with 97 additions and 13 deletions

@ -71,3 +71,15 @@ int test_widget() {
return 0;
}
int test_widget_mqtt() {
struct widget_t *w;
char *fn = "data/TestWidget-MQTT.json";
LOG(LL_INFO, ("widget_create_from_file(%s)", fn));
w = widget_create_from_file(fn);
ASSERT(w, "widget_create_from_file()");
ASSERT(w->x == 240, "'x' field is invalid");
ASSERT(w->type == WIDGET_TYPE_MQTT_BUTTON, "'type' field is not WIDGET_TYPE_MQTT_BUTTON");
return 0;
}