From a2b98af08902ce1c59a7521d2e491c3cc5c330f4 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Wed, 28 Aug 2019 15:35:47 -0400 Subject: tests in makefile, cleaned db test --- Makefile | 9 +++++++++ src/db.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8ff0588..36aad30 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,15 @@ install: @echo @echo ...Done! +.PHONY: test +test: + @echo + @echo Running tests... + @echo + cargo test + @echo + @echo ...Done! + .PHONY: uninstall uninstall: @echo diff --git a/src/db.rs b/src/db.rs index f892c10..07655c5 100644 --- a/src/db.rs +++ b/src/db.rs @@ -64,6 +64,6 @@ mod tests { let conn = Conn::init("/tmp/clinte-test.db"); let mut stmt = conn.prepare("SELECT * FROM POSTS").unwrap(); - stmt.query_map(rusqlite::NO_PARAMS, |row| Ok(())); + stmt.query_map(rusqlite::NO_PARAMS, |_| Ok(())).unwrap(); } } -- cgit 1.4.1-2-gfad0