Commit 4dd01a29 authored by louiz’'s avatar louiz’

Run the database tests with an in-memory sqlite db

parent 66887c22
...@@ -2,15 +2,12 @@ ...@@ -2,15 +2,12 @@
#include <database/database.hpp> #include <database/database.hpp>
#include <unistd.h>
#include <config/config.hpp> #include <config/config.hpp>
TEST_CASE("Database") TEST_CASE("Database")
{ {
#ifdef USE_DATABASE #ifdef USE_DATABASE
// Remove any potential existing db Config::set("db_name", ":memory:");
::unlink("./test.db");
Config::set("db_name", "test.db");
Database::set_verbose(false); Database::set_verbose(false);
auto o = Database::get_irc_server_options("zouzou@example.com", "irc.example.com"); auto o = Database::get_irc_server_options("zouzou@example.com", "irc.example.com");
o.update(); o.update();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment