2016-06-10 07:44:20 +02:00
|
|
|
{{- $tableNameSingular := titleCaseSingular .Table.Name -}}
|
|
|
|
{{- $dbName := singular .Table.Name -}}
|
|
|
|
{{- $tableNamePlural := titleCasePlural .Table.Name -}}
|
|
|
|
{{- $varNamePlural := camelCasePlural .Table.Name -}}
|
|
|
|
{{- $varNameSingular := camelCaseSingular .Table.Name -}}
|
|
|
|
|
|
|
|
func Test{{$tableNamePlural}}Find(t *testing.T) {
|
|
|
|
var err error
|
|
|
|
|
|
|
|
{{$varNamePlural}}DeleteAllRows(t)
|
|
|
|
|
|
|
|
o := make({{$varNameSingular}}Slice, 3)
|
|
|
|
if err = boil.RandomizeSlice(&o); err != nil {
|
|
|
|
t.Errorf("Unable to randomize {{$tableNameSingular}} slice: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|