Skip to content

Commit dbae8d9

Browse files
committed
tests/util/test_app: Remove obsolete db() fn
1 parent a614dbf commit dbae8d9

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/tests/util/test_app.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@ impl TestApp {
109109
Self::init().with_git_index().with_job_runner()
110110
}
111111

112-
/// Obtain the database connection and pass it to the closure
113-
///
114-
/// Within each test, the connection pool only has 1 connection so it is necessary to drop the
115-
/// connection before making any API calls. Once the closure returns, the connection is
116-
/// dropped, ensuring it is returned to the pool and available for any future API calls.
117-
pub fn db<T, F: FnOnce(&mut PgConnection) -> T>(&self, f: F) -> T {
118-
f(&mut self.db_conn())
119-
}
120-
121112
/// Obtain a database connection.
122113
pub fn db_conn(&self) -> PooledConnection<ConnectionManager<PgConnection>> {
123114
self.0.test_database.connect()

0 commit comments

Comments
 (0)