// Route: POST /workflow/release (bump, changelog, verify demo) #include "support/Assert.hpp" using namespace molo::example::test; int main() { Fixture f; auto feat = f.client->post("/workflow/release", "commits=feat(routing): add hello", "application/x-www-form-urlencoded"); check(feat.status == 200, "status 200"); check(contains(feat.body, "\"bump\":\"minor\""), "feat maps to minor"); check(contains(feat.body, "\"version\":\"0.2.0\""), "version bumped"); check(contains(feat.body, "\"green\":true"), "checks green"); auto breaking = f.client->post( "/workflow/release", "commits=feat!: drop old api", "application/x-www-form-urlencoded"); check(contains(breaking.body, "\"bump\":\"major\""), "bang maps to major"); auto bad = f.client->post("/workflow/release", "commits=nope", "application/x-www-form-urlencoded"); check(bad.status == 400, "malformed commit rejected"); return finish("workflow/release"); }