Files
moloapp/tests/example/routing/hello_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

17 lines
568 B
C++

// Route: GET /routing/hello/{name}
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto res = f.client->get("/routing/hello/ada");
check(res.status == 200, "status 200");
check(contains(res.body, "\"hello\":\"ada\""), "path param bound");
auto encoded = f.client->get("/routing/hello/a%20b");
check(contains(encoded.body, "\"hello\":\"a b\""), "param url-decoded");
auto missing = f.client->get("/routing/hello");
check(missing.status == 404, "missing segment is 404");
return finish("routing/hello");
}