We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60b5532 commit 29f4c15Copy full SHA for 29f4c15
error_translator_test.go
@@ -36,6 +36,11 @@ func TestDialector_Translate(t *testing.T) {
36
args: args{err: &pgconn.PgError{Code: "42703"}},
37
want: gorm.ErrInvalidField,
38
},
39
+ {
40
+ name: "it should return gorm.ErrCheckConstraintViolated error if the status code is 23514",
41
+ args: args{err: &pgconn.PgError{Code: "23514"}},
42
+ want: gorm.ErrCheckConstraintViolated,
43
+ },
44
}
45
for _, tt := range tests {
46
t.Run(tt.name, func(t *testing.T) {
0 commit comments