// Route: /kv/items #include "support/Assert.hpp" using namespace molo::example::test; int main() { Fixture f; auto missing = f.client->get("/kv/items?key=nope"); check(missing.status == 404, "missing key is 404"); auto bad = f.client->post("/kv/items", "{\"key\":\"a\"}", "application/json"); check(bad.status == 400, "key without value is 400"); auto put = f.client->post("/kv/items", "{\"key\":\"a\",\"value\":\"b\"}", "application/json"); check(put.status == 201, "store status 201"); auto get = f.client->get("/kv/items?key=a"); check(contains(get.body, "\"value\":\"b\""), "round trip works"); return finish("kv/items"); }