Skip to content

Commit b0f70ba

Browse files
committed
Update test to reflect new test environment
1 parent cb19137 commit b0f70ba

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/tests/all.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,11 @@ fn new_category<'a>(category: &'a str, slug: &'a str, description: &'a str) -> N
165165
// This reflects the configuration of our test environment. In the production application, this
166166
// does not hold true.
167167
#[test]
168-
fn multiple_live_references_to_the_same_connection_can_be_checked_out() {
169-
use std::ptr;
170-
168+
#[should_panic]
169+
fn recursive_get_of_db_conn_in_tests_will_panic() {
171170
let (app, _) = TestApp::init().empty();
172171
let app = app.as_inner();
173172

174-
let conn1 = app.primary_database.get().unwrap();
175-
let conn2 = app.primary_database.get().unwrap();
176-
let conn1_ref: &PgConnection = &conn1;
177-
let conn2_ref: &PgConnection = &conn2;
178-
179-
assert!(ptr::eq(conn1_ref, conn2_ref));
173+
let _conn1 = app.primary_database.get().unwrap();
174+
let _conn2 = app.primary_database.get().unwrap();
180175
}

0 commit comments

Comments
 (0)