From 26d40bc248ca034cdec1f61bce92ebeab240186f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 11 Dec 2017 13:49:42 +0800 Subject: [PATCH] add test for Sync2 --- session_schema_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/session_schema_test.go b/session_schema_test.go index fa2fa7eb..3ed30865 100644 --- a/session_schema_test.go +++ b/session_schema_test.go @@ -217,3 +217,17 @@ func TestCharst(t *testing.T) { 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))) +}