// Route: GET /sessions/counter (signed cookie session) #include "support/Assert.hpp" using namespace molo::example::test; int main() { Fixture f; auto first = f.client->get("/sessions/counter"); check(first.status == 200, "status 200"); check(contains(first.body, "\"count\":1"), "counter starts at 1"); check(contains(first.body, "\"fresh\":true"), "first visit is fresh"); check(first.headers.has("Set-Cookie"), "session cookie set"); auto second = f.client->get("/sessions/counter"); check(contains(second.body, "\"count\":2"), "jar keeps session"); check(contains(second.body, "\"fresh\":false"), "second visit resumes"); return finish("sessions/counter"); }