mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
doc/features: add dynamic values support (#3436)
This commit is contained in:
@@ -353,6 +353,12 @@ func TestInterface(t *testing.T) {
|
||||
require.Equal(t, []driver.Value{int64(10), int64(20)}, values)
|
||||
}
|
||||
|
||||
func TestScanTypeOf(t *testing.T) {
|
||||
mock := &Rows{ColumnScanner: toRows(sqlmock.NewRows([]string{"age"}).AddRow(10))}
|
||||
tv := ScanTypeOf(mock, 0)
|
||||
require.IsType(t, (*any)(nil), tv)
|
||||
}
|
||||
|
||||
func toRows(mrows *sqlmock.Rows) *sql.Rows {
|
||||
db, mock, _ := sqlmock.New()
|
||||
mock.ExpectQuery("").WillReturnRows(mrows)
|
||||
|
||||
Reference in New Issue
Block a user