Skip to content

Commit d32f22f

Browse files
committed
fix: tests
1 parent dbf7b12 commit d32f22f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/postgres/postgres.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ async fn it_can_work_with_nested_transactions() -> anyhow::Result<()> {
524524

525525
// begin
526526
let mut tx = conn.begin().await?; // transaction
527-
assert!(conn.is_in_transaction());
527+
assert!(tx.is_in_transaction());
528528

529529
// insert a user
530530
sqlx::query("INSERT INTO _sqlx_users_2523 (id) VALUES ($1)")
@@ -534,7 +534,7 @@ async fn it_can_work_with_nested_transactions() -> anyhow::Result<()> {
534534

535535
// begin once more
536536
let mut tx2 = tx.begin().await?; // savepoint
537-
assert!(conn.is_in_transaction());
537+
assert!(tx2.is_in_transaction());
538538

539539
// insert another user
540540
sqlx::query("INSERT INTO _sqlx_users_2523 (id) VALUES ($1)")
@@ -544,7 +544,7 @@ async fn it_can_work_with_nested_transactions() -> anyhow::Result<()> {
544544

545545
// never mind, rollback
546546
tx2.rollback().await?; // roll that one back
547-
assert!(conn.is_in_transaction());
547+
assert!(tx.is_in_transaction());
548548

549549
// did we really?
550550
let (count,): (i64,) = sqlx::query_as("SELECT COUNT(*) FROM _sqlx_users_2523")

0 commit comments

Comments
 (0)