diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-08-28 00:34:54 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-08-28 00:34:54 -0400 |
commit | 07511f9ef1088e2b931910744dbc2586fbd0007c (patch) | |
tree | ac218bdbbb9d1f38cbc1c2c659cc8490793797c9 | |
parent | bb930e901e7e402c51ec1173f57840104b87d3c7 (diff) | |
download | clinte-07511f9ef1088e2b931910744dbc2586fbd0007c.tar.gz |
minor db test - will expand later
-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(())); + } +} |