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:
@ -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
|
||||
|
Reference in New Issue
Block a user