ai-dev-template / cpp /tests /test_routes.cpp
Jordandevlog's picture
Upload cpp/tests/test_routes.cpp
4d5a4cb verified
Raw
History Blame Contribute Delete
385 Bytes
/**
* @file test_routes.cpp
* @brief Tests for API routes.
*/
#include <gtest/gtest.h>
#include "api/routes.hpp"
using namespace app::api;
TEST(RoutesTest, HealthCheckReturns200) {
auto response = health_check();
EXPECT_EQ(response.status_code, 200);
EXPECT_EQ(response.content_type, "application/json");
EXPECT_NE(response.body.find("ok"), std::string::npos);
}