~singpolyma/biboumi

4dd01a29caff8a1712478cb20e9137453367da07 — Florent Le Coz 9 years ago 66887c2
Run the database tests with an in-memory sqlite db
1 files changed, 1 insertions(+), 4 deletions(-)

M tests/database.cpp
M tests/database.cpp => tests/database.cpp +1 -4
@@ 2,15 2,12 @@

#include <database/database.hpp>

#include <unistd.h>
#include <config/config.hpp>

TEST_CASE("Database")
{
#ifdef USE_DATABASE
  // Remove any potential existing db
  ::unlink("./test.db");
  Config::set("db_name", "test.db");
  Config::set("db_name", ":memory:");
  Database::set_verbose(false);
  auto o = Database::get_irc_server_options("zouzou@example.com", "irc.example.com");
  o.update();