When testing we dont have api access so we create cache entries before each request. The cache key changed so this is now updated in the tests and tmdb.

This commit is contained in:
2018-03-20 20:12:49 +01:00
parent 7051edb212
commit 9e145f7068
8 changed files with 44 additions and 27 deletions

View File

@@ -1,8 +1,7 @@
const configuration = require('src/config/configuration').getInstance();
const SqliteDatabase = require('src/database/sqliteDatabase');
const host = process.env.TESTING ? ':memory:' : configuration.get('database', 'host');
const database = new SqliteDatabase(host);
const database = new SqliteDatabase(configuration.get('database', 'host'));
/**
* This module establishes a connection to the database
* specified in the confgiuration file. It tries to setup