We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e511d2 commit eb652a9Copy full SHA for eb652a9
models/migrations/v181_test.go
@@ -12,8 +12,14 @@ import (
12
)
13
14
func Test_addPrimaryEmail2EmailAddress(t *testing.T) {
15
+ type User struct {
16
+ ID int64
17
+ Email string
18
+ IsActive bool
19
+ }
20
+
21
// Prepare and load the testing database
- x, deferable := prepareTestEnv(t, 0)
22
+ x, deferable := prepareTestEnv(t, 0, new(User))
23
if x == nil || t.Failed() {
24
defer deferable()
25
return
@@ -32,12 +38,6 @@ func Test_addPrimaryEmail2EmailAddress(t *testing.T) {
32
38
IsPrimary bool `xorm:"DEFAULT(false) NOT NULL"`
33
39
}
34
40
35
- type User struct {
36
- ID int64
37
- Email string
- IsActive bool
- }
-
41
var users = make([]User, 0, 20)
42
err = x.Find(&users)
43
assert.NoError(t, err)
0 commit comments