feat: 支持主列表选择每页条数 (#242)
This commit is contained in:
@@ -20,6 +20,16 @@ type fakeInnerCodeWriter struct {
|
||||
updatedCode string
|
||||
}
|
||||
|
||||
func TestApplyInnerCodes_远程批量上限不随页面容量放宽(t *testing.T) {
|
||||
ids := make([]int64, InnerCodeRemoteBatchLimit+1)
|
||||
for i := range ids {
|
||||
ids[i] = int64(i + 1)
|
||||
}
|
||||
if _, err := ApplyInnerCodes(context.Background(), nil, nil, ids, "user-1"); err == nil {
|
||||
t.Fatal("超过 20 条时应该在访问数据库或顺运宝前拒绝")
|
||||
}
|
||||
}
|
||||
|
||||
func (f *fakeInnerCodeWriter) DetailListByStock(context.Context, []int64) ([]syb.StockDetail, error) {
|
||||
f.readCount++
|
||||
if f.readErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user