Skip to content

Commit

Permalink
more expected error text changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rck109d committed Oct 17, 2024
1 parent d8089e2 commit e8061ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ func TestTransactionBlock(t *testing.T) {
t.Fatal(err)
}

expectedError := "Error 1146: Table 'squalor_test.objects' doesn't exist"
expectedError := "Error 1146 (42S02): Table 'squalor_test.objects' doesn't exist"

if err := db.Transaction(func(tx *Tx) error {
_, err := tx.Exec("SELECT * from objects")
Expand All @@ -1079,7 +1079,7 @@ func TestTransactionBlockFailsOnDuplicatePrimaryKeyUpdate(t *testing.T) {
t.Fatal(err.Error())
}

expectedError := fmt.Sprintf("Error 1062: Duplicate entry '%v' for key 'PRIMARY'", u2.ID)
expectedError := fmt.Sprintf("Error 1062 (23000): Duplicate entry '%v' for key 'users.PRIMARY'", u2.ID)

if err := db.Transaction(func(tx *Tx) error {
_, err := db.Exec(fmt.Sprintf("UPDATE `users` SET id = %v WHERE `id` = %v", u2.ID, u1.ID))
Expand Down

0 comments on commit e8061ff

Please sign in to comment.