105 route tests, matrix crawl, spec and README updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
18 lines
727 B
C++
18 lines
727 B
C++
// Route: GET /v1/items (deprecated version: Deprecation, Sunset, Link)
|
|
#include "support/Assert.hpp"
|
|
|
|
using namespace molo::example::test;
|
|
using molo::example::fw::Method;
|
|
|
|
int main() {
|
|
Fixture f;
|
|
auto r = f.client->get("/v1/items");
|
|
check(r.status == 200 && contains(r.body, "\"v1\""), "ok");
|
|
check(r.headers.get("Deprecation") == "true", "Deprecation header");
|
|
check(contains(r.headers.get("Sunset"), "GMT"), "Sunset header");
|
|
check(contains(r.headers.get("Link"), "successor-version") && contains(r.headers.get("Link"), "/v2/items"), "Link successor");
|
|
check(f.client->post("/v1/items").status == 405, "405 on post");
|
|
check(f.client->get("/v1/nothing").status == 404, "404");
|
|
return finish("v1/items");
|
|
}
|