mono-cpp/tests/unit/test_postgres.cpp
2026-02-18 11:42:14 +01:00

15 lines
476 B
C++

#include <catch2/catch_test_macros.hpp>
#include "postgres/postgres.h"
TEST_CASE("postgres::connect returns ok for any input (stub)", "[postgres]") {
auto result = postgres::connect("postgresql://localhost:5432/test");
CHECK(result == "ok");
}
TEST_CASE("postgres::connect accepts different connection strings",
"[postgres]") {
CHECK(postgres::connect("postgresql://user:pass@host:5432/db") == "ok");
CHECK(postgres::connect("") == "ok");
}