Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 950ea10

Browse files
committed
fix tests
1 parent 4da260a commit 950ea10

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

session_cols_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ func TestCols(t *testing.T) {
5454
assert.NoError(t, err)
5555

5656
sess := testEngine.ID(1)
57-
_, err = sess.Cols("col1").Cols("col2").Update(&ColsTable{
57+
col1Name := mapper.Obj2Table("Col1")
58+
col2Name := mapper.Obj2Table("Col2")
59+
_, err = sess.Cols(col1Name).Cols(col2Name).Update(&ColsTable{
5860
Col1: "",
5961
Col2: "",
6062
})
@@ -103,7 +105,8 @@ func TestMustCol(t *testing.T) {
103105
}
104106

105107
customer.ParentId = 0
106-
affected, err := testEngine.MustCols("parent_id").Update(&customer, &CustomerOnlyId{Id: customer.Id})
108+
parentIDName := mapper.Obj2Table("ParentId")
109+
affected, err := testEngine.MustCols(parentIDName).Update(&customer, &CustomerOnlyId{Id: customer.Id})
107110
assert.NoError(t, err)
108111
assert.EqualValues(t, 1, affected)
109112
}

0 commit comments

Comments
 (0)