@@ -180,6 +180,21 @@ func searchIssueByID(t *testing.T) {
180
180
},
181
181
[]int64 {11 , 6 , 5 , 3 , 2 , 1 },
182
182
},
183
+ {
184
+ // issue 20 request user 15 and team 5 which user 15 belongs to
185
+ // the review request number of issue 20 should be 1
186
+ SearchOptions {
187
+ ReviewRequestedID : int64Pointer (15 ),
188
+ },
189
+ []int64 {12 , 20 },
190
+ },
191
+ {
192
+ // user 20 approved the issue 20, so return nothing
193
+ SearchOptions {
194
+ ReviewRequestedID : int64Pointer (20 ),
195
+ },
196
+ []int64 {},
197
+ },
183
198
}
184
199
185
200
for _ , test := range tests {
@@ -206,7 +221,7 @@ func searchIssueIsPull(t *testing.T) {
206
221
SearchOptions {
207
222
IsPull : util .OptionalBoolTrue ,
208
223
},
209
- []int64 {12 , 11 , 19 , 9 , 8 , 3 , 2 },
224
+ []int64 {12 , 11 , 20 , 19 , 9 , 8 , 3 , 2 },
210
225
},
211
226
}
212
227
for _ , test := range tests {
@@ -227,7 +242,7 @@ func searchIssueIsClosed(t *testing.T) {
227
242
SearchOptions {
228
243
IsClosed : util .OptionalBoolFalse ,
229
244
},
230
- []int64 {17 , 16 , 15 , 14 , 13 , 12 , 11 , 6 , 19 , 18 , 10 , 7 , 9 , 8 , 3 , 2 , 1 },
245
+ []int64 {17 , 16 , 15 , 14 , 13 , 12 , 11 , 20 , 6 , 19 , 18 , 10 , 7 , 9 , 8 , 3 , 2 , 1 },
231
246
},
232
247
{
233
248
SearchOptions {
@@ -293,7 +308,7 @@ func searchIssueByLabelID(t *testing.T) {
293
308
SearchOptions {
294
309
ExcludedLabelIDs : []int64 {1 },
295
310
},
296
- []int64 {17 , 16 , 15 , 14 , 13 , 12 , 11 , 6 , 5 , 19 , 18 , 10 , 7 , 4 , 9 , 8 , 3 },
311
+ []int64 {17 , 16 , 15 , 14 , 13 , 12 , 11 , 20 , 6 , 5 , 19 , 18 , 10 , 7 , 4 , 9 , 8 , 3 },
297
312
},
298
313
}
299
314
for _ , test := range tests {
@@ -317,7 +332,7 @@ func searchIssueByTime(t *testing.T) {
317
332
SearchOptions {
318
333
UpdatedAfterUnix : int64Pointer (0 ),
319
334
},
320
- []int64 {17 , 16 , 15 , 14 , 13 , 12 , 11 , 6 , 5 , 19 , 18 , 10 , 7 , 4 , 9 , 8 , 3 , 2 , 1 },
335
+ []int64 {17 , 16 , 15 , 14 , 13 , 12 , 11 , 20 , 6 , 5 , 19 , 18 , 10 , 7 , 4 , 9 , 8 , 3 , 2 , 1 },
321
336
},
322
337
}
323
338
for _ , test := range tests {
@@ -338,7 +353,7 @@ func searchIssueWithOrder(t *testing.T) {
338
353
SearchOptions {
339
354
SortBy : internal .SortByCreatedAsc ,
340
355
},
341
- []int64 {1 , 2 , 3 , 8 , 9 , 4 , 7 , 10 , 18 , 19 , 5 , 6 , 11 , 12 , 13 , 14 , 15 , 16 , 17 },
356
+ []int64 {1 , 2 , 3 , 8 , 9 , 4 , 7 , 10 , 18 , 19 , 5 , 6 , 20 , 11 , 12 , 13 , 14 , 15 , 16 , 17 },
342
357
},
343
358
}
344
359
for _ , test := range tests {
@@ -393,7 +408,7 @@ func searchIssueWithPaginator(t *testing.T) {
393
408
},
394
409
},
395
410
[]int64 {17 , 16 , 15 , 14 , 13 },
396
- 19 ,
411
+ 20 ,
397
412
},
398
413
}
399
414
for _ , test := range tests {
0 commit comments