summary refs log tree commit diff stats
path: root/src/db.rs
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-08-28 00:34:54 -0400
committerBen Morrison <ben@gbmor.dev>2019-08-28 00:34:54 -0400
commit07511f9ef1088e2b931910744dbc2586fbd0007c (patch)
treeac218bdbbb9d1f38cbc1c2c659cc8490793797c9 /src/db.rs
parentbb930e901e7e402c51ec1173f57840104b87d3c7 (diff)
downloadclinte-07511f9ef1088e2b931910744dbc2586fbd0007c.tar.gz
minor db test - will expand later
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs13
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(()));
+    }
+}