From 2f220161a5c55be8d9abe205010b78cca2d9c47c Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Thu, 10 Dec 2015 20:16:46 -0500 Subject: [PATCH] Add extra check to named-parameter insertion unit test --- src/named_params.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/named_params.rs b/src/named_params.rs index dd9cc2f..ecafe56 100644 --- a/src/named_params.rs +++ b/src/named_params.rs @@ -189,6 +189,12 @@ mod test { let mut stmt = db.prepare("INSERT INTO test (id, name, flag) VALUES (:id, :name, :flag)") .unwrap(); stmt.execute_named(&[(":name", &"one")]).unwrap(); + + assert_eq!(1i32, + db.query_named_row("SELECT COUNT(*) FROM test WHERE name = :name", + &[(":name", &"one")], + |r| r.get(0)) + .unwrap()); } #[test]