fix tests
This commit is contained in:
parent
ba83909d2d
commit
372ece5469
|
@ -81,7 +81,9 @@ func TestCols(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
sess := testEngine.ID(1)
|
||||
_, err = sess.Cols("col1").Cols("col2").Update(&ColsTable{
|
||||
col1Name := mapper.Obj2Table("Col1")
|
||||
col2Name := mapper.Obj2Table("Col2")
|
||||
_, err = sess.Cols(col1Name).Cols(col2Name).Update(&ColsTable{
|
||||
Col1: "",
|
||||
Col2: "",
|
||||
})
|
||||
|
@ -130,7 +132,8 @@ func TestMustCol(t *testing.T) {
|
|||
}
|
||||
|
||||
customer.ParentId = 0
|
||||
affected, err := testEngine.MustCols("parent_id").Update(&customer, &CustomerOnlyId{Id: customer.Id})
|
||||
parentIDName := mapper.Obj2Table("ParentId")
|
||||
affected, err := testEngine.MustCols(parentIDName).Update(&customer, &CustomerOnlyId{Id: customer.Id})
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, 1, affected)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue