1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-03 16:30:19 +00:00

orm full remove orm.Manager for simple use, add struct tag - for skip struct field

This commit is contained in:
slene
2013-08-09 20:14:18 +08:00
parent 402932aa6e
commit f2b359d8e8
16 changed files with 161 additions and 301 deletions

View File

@ -152,6 +152,14 @@ func throwFailNow(t *testing.T, err error, args ...interface{}) {
}
}
func TestModelSyntax(t *testing.T) {
mi, ok := modelCache.get("user")
throwFail(t, AssertIs(ok, T_Equal, true))
if ok {
throwFail(t, AssertIs(mi.fields.GetByName("ShouldSkip") == nil, T_Equal, true))
}
}
func TestCRUD(t *testing.T) {
profile := NewProfile()
profile.Age = 30