Files
moloapp/tests/example/governance/versions_test.cpp
T

16 lines
597 B
C++
Raw Normal View History

// Route: GET /governance/versions (version table)
#include "support/Assert.hpp"
using namespace molo::example::test;
using molo::example::fw::Method;
int main() {
Fixture f;
auto r = f.client->get("/governance/versions");
check(r.status == 200 && contains(r.body, "\"deprecated\":true") && contains(r.body, "\"deprecated\":false"), "table");
check(contains(r.body, "GMT"), "sunset date listed");
check(f.client->post("/governance/versions").status == 405, "405");
check(contains(r.headers.get("Content-Type"), "application/json"), "json");
return finish("governance/versions");
}