Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
demoManito committed Oct 20, 2023
1 parent b626af0 commit df73787
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/sql_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ func assertEqualSQL(t *testing.T, expected string, actually string) {
actually = replaceQuoteInSQL(actually)

// ignore updated_at value, because it's generated in Gorm internal, can't to mock value on update.
updatedAtRe := regexp.MustCompile(`(?i)"updated_at"=".+?"`)
actually = updatedAtRe.ReplaceAllString(actually, `"updated_at"=?`)
expected = updatedAtRe.ReplaceAllString(expected, `"updated_at"=?`)
updatedAtRe := regexp.MustCompile(`(?i)"updated_at" = ".+?"`)
actually = updatedAtRe.ReplaceAllString(actually, `"updated_at" = ?`)
expected = updatedAtRe.ReplaceAllString(expected, `"updated_at" = ?`)

// ignore RETURNING "id" (only in PostgreSQL)
returningRe := regexp.MustCompile(`(?i)RETURNING "id"`)
Expand Down

0 comments on commit df73787

Please sign in to comment.