Files
moloapp/tests/example/supervisor/tasks_test.cpp
T
retoor 3c4334cec9 feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security,
data, app, realtime, supervisor, clients, CLI, example plus
enterprise tenancy, audit, operability, governance,
supplychain. Postgres via docker compose for tests.
2026-10-23 18:20:04 +02:00

19 lines
656 B
C++

// Route: /supervisor/tasks (enqueue plus list)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto add = f.client->post("/supervisor/tasks",
"{\"kind\":\"email\",\"payload\":\"{}\" }",
"application/json");
check(add.status == 201, "enqueue is 201");
check(contains(add.body, "\"id\":\"task-"), "task id issued");
auto list = f.client->get("/supervisor/tasks");
check(contains(list.body, "task-1"), "task listed");
check(f.services.tasks->list().size() == 1,
"side effect: queue holds one");
return finish("supervisor/tasks");
}