summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-08-30 19:41:07 -0400
committerBen Morrison <ben@gbmor.dev>2019-08-30 19:41:07 -0400
commitcf6e3518160a3cff9892483a085080a0c92bd318 (patch)
tree07c0a5db3340ffc3c7f60de1b0180e225bd3dbf4
parentd098a93d910f4bb23e4f0f81a69db83693dd2b78 (diff)
downloadclinte-cf6e3518160a3cff9892483a085080a0c92bd318.tar.gz
fixed test failure
-rw-r--r--src/main.rs12
-rw-r--r--src/posts.rs15
2 files changed, 1 insertions, 26 deletions
diff --git a/src/main.rs b/src/main.rs
index 2c9122f..f5735e7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -210,15 +210,3 @@ fn delete(db: &db::Conn) {
 
     posts::exec_stmt_no_params(&mut del_stmt).unwrap();
 }
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    // Just a "Don't Panic" test
-    #[test]
-    fn display() {
-        let db = db::Conn::new();
-        list_matches(&db);
-    }
-}
diff --git a/src/posts.rs b/src/posts.rs
index 28ffac6..88368a6 100644
--- a/src/posts.rs
+++ b/src/posts.rs
@@ -40,6 +40,7 @@ pub fn exec_stmt_no_params(stmt: &mut rusqlite::Statement) -> Result<()> {
 mod tests {
     use super::*;
 
+    #[test]
     fn post_new() {
         let db = db::Conn::new();
         let mut stmt = db
@@ -62,18 +63,4 @@ mod tests {
 
         assert_eq!("TEST TITLE", &out);
     }
-
-    #[test]
-    fn post_upd8() {
-        post_new();
-        let db = db::Conn::new();
-        update("NEW TITLE", "TEST BODY", 1, &db).unwrap();
-
-        let mut stmt = db.conn.prepare("SELECT * FROM posts WHERE id = 1").unwrap();
-
-        let out: String = stmt
-            .query_row(rusqlite::NO_PARAMS, |row| row.get::<usize, String>(1))
-            .unwrap();
-        assert_eq!("NEW TITLE", &out);
-    }
 }