Add test to confirm #1247 resolved

This commit is contained in:
Lunny Xiao 2021-06-12 17:48:21 +08:00
parent 7fd6356a85
commit bd20051938
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 5 additions and 0 deletions

View File

@ -472,6 +472,11 @@ func TestUpdateIncrDecr(t *testing.T) {
cnt, err = testEngine.ID(col1.Id).Cols(colName).Incr(colName).Update(col1)
assert.NoError(t, err)
assert.EqualValues(t, 1, cnt)
testEngine.SetColumnMapper(testEngine.GetColumnMapper())
cnt, err = testEngine.Cols(colName).Decr(colName, 2).ID(col1.Id).Update(new(UpdateIncr))
assert.NoError(t, err)
assert.EqualValues(t, 1, cnt)
}
type UpdatedUpdate struct {