From dbae8d922c4a193e503f452f02f8f6548e0ee0e1 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Tue, 22 Oct 2024 01:30:39 +0200 Subject: [PATCH] tests/util/test_app: Remove obsolete `db()` fn --- src/tests/util/test_app.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/tests/util/test_app.rs b/src/tests/util/test_app.rs index 4b9be02d25..86315d40a8 100644 --- a/src/tests/util/test_app.rs +++ b/src/tests/util/test_app.rs @@ -109,15 +109,6 @@ impl TestApp { Self::init().with_git_index().with_job_runner() } - /// Obtain the database connection and pass it to the closure - /// - /// Within each test, the connection pool only has 1 connection so it is necessary to drop the - /// connection before making any API calls. Once the closure returns, the connection is - /// dropped, ensuring it is returned to the pool and available for any future API calls. - pub fn db T>(&self, f: F) -> T { - f(&mut self.db_conn()) - } - /// Obtain a database connection. pub fn db_conn(&self) -> PooledConnection> { self.0.test_database.connect()