[fix] unit tests
This commit is contained in:
parent
d012aac872
commit
21f237d8f2
2 changed files with 11 additions and 10 deletions
|
|
@ -333,14 +333,14 @@ func testData(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func clear(t *testing.T) {
|
func clear(t *testing.T) {
|
||||||
pet := gou.Select("pet")
|
for _, m := range gou.Models {
|
||||||
err := pet.DropTable()
|
err := m.DropTable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
err = m.Migrate(true)
|
||||||
err = pet.Migrate(true)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ import (
|
||||||
// GET /api/__yao/table/:id/get -> Default process: yao.table.Get $param.id :query
|
// 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/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
|
// 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/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/: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
|
// POST /api/__yao/table/:id/update/where -> Default process: yao.table.UpdateWhere $param.id :query :payload
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue