Skip to content

Commit a5c7fc1

Browse files
committed
fix: test db connection
1 parent f0937e7 commit a5c7fc1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ mod tests {
104104
node.get_host_port(5432).unwrap()
105105
);
106106

107-
let _pool = setup_database(connection_string).await.unwrap();
107+
let pool = setup_database(connection_string).await.unwrap();
108+
109+
let actual: (i64,) = sqlx::query_as("SELECT $1")
110+
.bind(150_i64)
111+
.fetch_one(&pool)
112+
.await
113+
.unwrap();
114+
115+
assert_eq!(150_i64, actual.0)
108116
}
109117
}

0 commit comments

Comments
 (0)