File size: 385 Bytes
4d5a4cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * @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);
}