diff options
Diffstat (limited to 'src/posts.rs')
-rw-r--r-- | src/posts.rs | 15 |
1 files changed, 1 insertions, 14 deletions
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); - } } |