1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 03:10:56 +00:00

orm: add test case for InsertMulti

This commit is contained in:
miraclesu 2016-04-13 20:20:49 +08:00
parent 3a3f70027c
commit 903e21bef2

View File

@ -2042,6 +2042,12 @@ func TestIntegerPk(t *testing.T) {
throwFail(t, err) throwFail(t, err)
throwFail(t, AssertIs(out.Value, intPk.Value)) throwFail(t, AssertIs(out.Value, intPk.Value))
} }
num, err = dORM.InsertMulti(1, []*IntegerPk{&IntegerPk{
ID: 1, Value: "ok",
}})
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
} }
func TestInsertAuto(t *testing.T) { func TestInsertAuto(t *testing.T) {