[fix] unit tests

This commit is contained in:
Max 2022-09-24 22:48:49 +08:00
parent d012aac872
commit 21f237d8f2
2 changed files with 11 additions and 10 deletions

View file

@ -333,14 +333,14 @@ func testData(t *testing.T) {
}
func clear(t *testing.T) {
pet := gou.Select("pet")
err := pet.DropTable()
if err != nil {
t.Fatal(err)
}
err = pet.Migrate(true)
if err != nil {
t.Fatal(err)
for _, m := range gou.Models {
err := m.DropTable()
if err != nil {
t.Fatal(err)
}
err = m.Migrate(true)
if err != nil {
t.Fatal(err)
}
}
}

View file

@ -21,7 +21,8 @@ import (
// GET /api/__yao/table/:id/get -> Default process: yao.table.Get $param.id :query
// GET /api/__yao/table/:id/find/:primary -> Default process: yao.table.Find $param.id $param.primary :query
// GET /api/__yao/table/:id/component/:name/:method -> Default process: yao.table.Component $param.id $param.name $param.method :query
// POST /api/__yao/table/:id/save -> Default process: yao.table.Save $param.id $param.primary :payload
// POST /api/__yao/table/:id/save -> Default process: yao.table.Save $param.id :payload
// POST /api/__yao/table/:id/create -> Default process: yao.table.Create $param.id :payload
// POST /api/__yao/table/:id/insert -> Default process: yao.table.Insert :payload
// POST /api/__yao/table/:id/update/:primary -> Default process: yao.table.Update $param.id $param.primary :payload
// POST /api/__yao/table/:id/update/where -> Default process: yao.table.UpdateWhere $param.id :query :payload