finish test

This commit is contained in:
6543 2020-06-27 23:11:17 +02:00
parent e5ff26e652
commit 561cd0b753
No known key found for this signature in database
GPG Key ID: A1CA74D27FD13271
1 changed files with 9 additions and 2 deletions

View File

@ -339,8 +339,15 @@ func TestDropTableCols(t *testing.T) {
Name string `xorm:"default('my_name')"`
}
assert.NoError(t, prepareEngine())
assert.NoError(t, PrepareEngine())
assert.NoError(t, testEngine.Sync2(new(TestDropTableCols)))
schema, err := testEngine.TableInfo(new(TestDropTableCols))
assert.NoError(t, err)
assert.NotNil(t, schema.GetColumn("to_drop"))
assert.NoError(t, testEngine.DropTableCols(new(TestDropTableCols), "name", "to_drop"))
//ToDo: TEST if cols still exist
schema, err = testEngine.TableInfo(new(TestDropTableCols))
assert.NoError(t, err)
assert.Nil(t, schema.GetColumn("to_drop"))
}