Files
moloapp/tests/example/google/enterprise/page_test.cpp
T
retoorandClaude Sonnet 5.5 0e3816691b feat(clients): enterprise: Discovery Engine, Dialogflow, Retail, Insights, CES, Recommendations
1080-row Discovery-derived call table, validating Caller, typed facades,
demo under /google/enterprise, Discovery checker, live read checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:04:37 +01:00

19 lines
823 B
C++

// Route: GET /google/enterprise (the page)
#include "support/GoogleRig.hpp"
using namespace molo::example::test;
int main() {
GoogleRig rig(false);
Fixture f(rig.client);
auto res = f.client->get("/google/enterprise");
check(res.status == 200, "page is 200 without a credential");
check(contains(res.headers.get("Content-Type"), "text/html"), "html");
check(contains(res.body, "Enterprise APIs") && contains(res.body, "e-run"), "page content");
check(contains(res.body, "/embedded/google_enterprise.js"), "script linked");
check(rig.mock->send_count() == 0, "side effect: no upstream traffic");
check(f.client->post("/google/enterprise").status == 405, "post is 405");
check(f.client->get("/embedded/google_enterprise.js").status == 200, "asset served");
return finish("google/enterprise/page");
}