Skip to content

Commit

Permalink
Fix TestTransactionWithBlock panic case
Browse files Browse the repository at this point in the history
Panic will rollback case should use "transaction-3".
  • Loading branch information
lingceng authored Mar 5, 2020
1 parent 7180bd0 commit 30433f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func TestTransactionWithBlock(t *testing.T) {
})
})

if err := DB.First(&User{}, "name = ?", "transcation").Error; err == nil {
if err := DB.First(&User{}, "name = ?", "transcation-3").Error; err == nil {
t.Errorf("Should not find record after panic rollback")
}
}
Expand Down

0 comments on commit 30433f9

Please sign in to comment.