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 3e09cc8

Browse files
committedAug 20, 2019
fix tests
1 parent ff5a5fd commit 3e09cc8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎session_find_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -812,11 +812,15 @@ func TestFindMapCols(t *testing.T) {
812812
assert.NoError(t, prepareEngine())
813813
assertSync(t, new(FindMapCols))
814814

815+
id := testEngine.GetColumnMapper().Obj2Table("Id")
816+
colA := testEngine.GetColumnMapper().Obj2Table("ColA")
817+
colB := testEngine.GetColumnMapper().Obj2Table("ColB")
818+
815819
var objs = make(map[int64]*FindMapCols)
816-
err := testEngine.Cols("col_a, col_b").Find(&objs)
820+
err := testEngine.Cols(colA, colB).Find(&objs)
817821
assert.Error(t, err)
818822
assert.True(t, IsErrPrimaryKeyNoSelected(err))
819823

820-
err = testEngine.Cols("id, col_a, col_b").Find(&objs)
824+
err = testEngine.Cols(id, colA, colB).Find(&objs)
821825
assert.NoError(t, err)
822826
}

0 commit comments

Comments
 (0)