Files

19 lines
813 B
C++

// Route: GET /google/workspace (page, no credential needed)
#include "support/GoogleRig.hpp"
using namespace molo::example::test;
int main() {
GoogleRig rig(false);
Fixture f(rig.client);
auto res = f.client->get("/google/workspace");
check(res.status == 200, "status 200");
check(contains(res.headers.get("Content-Type"), "text/html"), "html");
check(contains(res.body, "Google Workspace") && contains(res.body, "viewport"), "page and mobile viewport");
check(contains(res.body, "/embedded/google_workspace.js"), "script wired");
check(contains(res.body, "<select"), "dropdowns, not a button wall");
check(f.client->post("/google/workspace", "{}", "application/json").status == 405, "post is 405");
check(rig.mock->send_count() == 0, "no network");
return finish("google/workspace");
}