Commit d32f22f 1 parent dbf7b12 commit d32f22f Copy full SHA for d32f22f
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ async fn it_can_work_with_nested_transactions() -> anyhow::Result<()> {
524
524
525
525
// begin
526
526
let mut tx = conn. begin ( ) . await ?; // transaction
527
- assert ! ( conn . is_in_transaction( ) ) ;
527
+ assert ! ( tx . is_in_transaction( ) ) ;
528
528
529
529
// insert a user
530
530
sqlx:: query ( "INSERT INTO _sqlx_users_2523 (id) VALUES ($1)" )
@@ -534,7 +534,7 @@ async fn it_can_work_with_nested_transactions() -> anyhow::Result<()> {
534
534
535
535
// begin once more
536
536
let mut tx2 = tx. begin ( ) . await ?; // savepoint
537
- assert ! ( conn . is_in_transaction( ) ) ;
537
+ assert ! ( tx2 . is_in_transaction( ) ) ;
538
538
539
539
// insert another user
540
540
sqlx:: query ( "INSERT INTO _sqlx_users_2523 (id) VALUES ($1)" )
@@ -544,7 +544,7 @@ async fn it_can_work_with_nested_transactions() -> anyhow::Result<()> {
544
544
545
545
// never mind, rollback
546
546
tx2. rollback ( ) . await ?; // roll that one back
547
- assert ! ( conn . is_in_transaction( ) ) ;
547
+ assert ! ( tx . is_in_transaction( ) ) ;
548
548
549
549
// did we really?
550
550
let ( count, ) : ( i64 , ) = sqlx:: query_as ( "SELECT COUNT(*) FROM _sqlx_users_2523" )
You can’t perform that action at this time.
0 commit comments