diff options
-rw-r--r-- | src/db.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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(())); + } +} |