diff --git a/postgres-tokio/src/test.rs b/postgres-tokio/src/test.rs index 12d0a7d3..20031a2b 100644 --- a/postgres-tokio/src/test.rs +++ b/postgres-tokio/src/test.rs @@ -133,9 +133,12 @@ fn query() { }) .and_then(|c| c.prepare("SELECT id, name FROM foo ORDER BY id")) .and_then(|(s, c)| c.query(&s, &[]).collect()) - .map(|(r, _)| { + .and_then(|(r, c)| { assert_eq!(r[0].get::("name"), "joe"); assert_eq!(r[1].get::("name"), "bob"); - }); + c.prepare("") + }) + .and_then(|(s, c)| c.query(&s, &[]).collect()) + .map(|(r, _)| assert!(r.is_empty())); l.run(done).unwrap(); }