Add test for find limit (#1904)

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1904
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Lunny Xiao 2021-06-06 21:31:15 +08:00
parent 8843a88503
commit 2910bffb1b
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ func TestFind(t *testing.T) {
err := testEngine.Find(&users)
assert.NoError(t, err)
err = testEngine.Limit(10, 0).Find(&users)
assert.NoError(t, err)
users2 := make([]Userinfo, 0)
var tbName = testEngine.Quote(testEngine.TableName(new(Userinfo), true))
err = testEngine.SQL("select * from " + tbName).Find(&users2)