summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
-    }
 }