add test for Sync2

This commit is contained in:
Lunny Xiao 2017-12-11 13:49:42 +08:00
parent e0c5a951ff
commit 26d40bc248
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 14 additions and 0 deletions

View File

@ -217,3 +217,17 @@ func TestCharst(t *testing.T) {
panic(err) panic(err)
} }
} }
func TestSync2_1(t *testing.T) {
type WxTest struct {
Id int `xorm:"not null pk autoincr INT(64)`
Passport_user_type int16 `xorm:"null int"`
Id_delete int8 `xorm:"null int default 1"`
}
assert.NoError(t, prepareEngine())
assert.NoError(t, testEngine.DropTables("wx_test"))
assert.NoError(t, testEngine.Sync2(new(WxTest)))
assert.NoError(t, testEngine.Sync2(new(WxTest)))
}