@@ -180,6 +180,21 @@ func searchIssueByID(t *testing.T) {
180180 },
181181 []int64 {11 , 6 , 5 , 3 , 2 , 1 },
182182 },
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+ },
183198 }
184199
185200 for _ , test := range tests {
@@ -206,7 +221,7 @@ func searchIssueIsPull(t *testing.T) {
206221 SearchOptions {
207222 IsPull : util .OptionalBoolTrue ,
208223 },
209- []int64 {12 , 11 , 19 , 9 , 8 , 3 , 2 },
224+ []int64 {12 , 11 , 20 , 19 , 9 , 8 , 3 , 2 },
210225 },
211226 }
212227 for _ , test := range tests {
@@ -227,7 +242,7 @@ func searchIssueIsClosed(t *testing.T) {
227242 SearchOptions {
228243 IsClosed : util .OptionalBoolFalse ,
229244 },
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 },
231246 },
232247 {
233248 SearchOptions {
@@ -293,7 +308,7 @@ func searchIssueByLabelID(t *testing.T) {
293308 SearchOptions {
294309 ExcludedLabelIDs : []int64 {1 },
295310 },
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 },
297312 },
298313 }
299314 for _ , test := range tests {
@@ -317,7 +332,7 @@ func searchIssueByTime(t *testing.T) {
317332 SearchOptions {
318333 UpdatedAfterUnix : int64Pointer (0 ),
319334 },
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 },
321336 },
322337 }
323338 for _ , test := range tests {
@@ -338,7 +353,7 @@ func searchIssueWithOrder(t *testing.T) {
338353 SearchOptions {
339354 SortBy : internal .SortByCreatedAsc ,
340355 },
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 },
342357 },
343358 }
344359 for _ , test := range tests {
@@ -393,7 +408,7 @@ func searchIssueWithPaginator(t *testing.T) {
393408 },
394409 },
395410 []int64 {17 , 16 , 15 , 14 , 13 },
396- 19 ,
411+ 20 ,
397412 },
398413 }
399414 for _ , test := range tests {
0 commit comments