Skip to content

Commit eb652a9

Browse files
committed
Fix test
1 parent 7e511d2 commit eb652a9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

models/migrations/v181_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ import (
1212
)
1313

1414
func Test_addPrimaryEmail2EmailAddress(t *testing.T) {
15+
type User struct {
16+
ID int64
17+
Email string
18+
IsActive bool
19+
}
20+
1521
// Prepare and load the testing database
16-
x, deferable := prepareTestEnv(t, 0)
22+
x, deferable := prepareTestEnv(t, 0, new(User))
1723
if x == nil || t.Failed() {
1824
defer deferable()
1925
return
@@ -32,12 +38,6 @@ func Test_addPrimaryEmail2EmailAddress(t *testing.T) {
3238
IsPrimary bool `xorm:"DEFAULT(false) NOT NULL"`
3339
}
3440

35-
type User struct {
36-
ID int64
37-
Email string
38-
IsActive bool
39-
}
40-
4141
var users = make([]User, 0, 20)
4242
err = x.Find(&users)
4343
assert.NoError(t, err)

0 commit comments

Comments
 (0)