From 07511f9ef1088e2b931910744dbc2586fbd0007c Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Wed, 28 Aug 2019 00:34:54 -0400 Subject: minor db test - will expand later --- src/db.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/db.rs b/src/db.rs index fe10325..dcdf4b3 100644 --- a/src/db.rs +++ b/src/db.rs @@ -52,3 +52,16 @@ impl Conn { Conn { conn: Conn::init() } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_new() { + let conn = Conn::init(); + let mut stmt = conn.prepare("SELECT * FROM POSTS").unwrap(); + + stmt.query_map(rusqlite::NO_PARAMS, |row| Ok(())); + } +} -- cgit 1.4.1-2-gfad0