Update unit tests to mock datasets properly
This commit is contained in:
parent
de9e668a72
commit
56bb676545
|
@ -488,15 +488,18 @@ pub mod tests {
|
|||
|
||||
// Mock a database file in transient memory
|
||||
pub fn mock_datasets() -> sqlite::Result<Connection> {
|
||||
let query = "
|
||||
PRAGMA foreign_keys = ON;
|
||||
let query = "PRAGMA foreign_keys = ON;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS datasets (
|
||||
name TEXT UNIQUE NOT NULL,
|
||||
last_sync INTEGER NOT NULL,
|
||||
game_id INTEGER NOT NULL,
|
||||
game_name TEXT NOT NULL,
|
||||
state TEXT
|
||||
country TEXT,
|
||||
state TEXT,
|
||||
decay_rate REAL NOT NULL,
|
||||
period REAL NOT NULL,
|
||||
tau REAL NOT NULL
|
||||
) STRICT;";
|
||||
|
||||
let connection = sqlite::open(":memory:")?;
|
||||
|
|
Loading…
Reference in a new issue