summaryrefslogtreecommitdiff
path: root/tests/database.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-10-31 05:35:59 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-10-31 05:35:59 +0100
commit4dd01a29caff8a1712478cb20e9137453367da07 (patch)
treec77c08470efd69b2e36e1031169263d1293f8e1c /tests/database.cpp
parent66887c225b63cecea62d17bcfae40cddef38c9d1 (diff)
downloadbiboumi-4dd01a29caff8a1712478cb20e9137453367da07.tar.gz
biboumi-4dd01a29caff8a1712478cb20e9137453367da07.tar.bz2
biboumi-4dd01a29caff8a1712478cb20e9137453367da07.tar.xz
biboumi-4dd01a29caff8a1712478cb20e9137453367da07.zip
Run the database tests with an in-memory sqlite db
Diffstat (limited to 'tests/database.cpp')
-rw-r--r--tests/database.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/database.cpp b/tests/database.cpp
index c248568..c0f4e9f 100644
--- a/tests/database.cpp
+++ b/tests/database.cpp
@@ -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();