Files
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

22 lines
894 B
C++

// Route: /routing/views/greet (class-based view, GET plus POST)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto get = f.client->get("/routing/views/greet?name=grace");
check(get.status == 200, "GET status 200");
check(contains(get.body, "GreetView"), "view dispatched GET");
check(contains(get.body, "grace"), "query value used");
auto post = f.client->post("/routing/views/greet", "name=ada",
"application/x-www-form-urlencoded");
check(post.status == 200, "POST status 200");
check(contains(post.body, "\"method\":\"POST\""), "view dispatched POST");
auto put = f.client->request(molo::example::fw::Method::Put,
"/routing/views/greet");
check(put.status == 404 || put.status == 405,
"unregistered method rejected");
return finish("routing/views");
}