There was an error while loading. Please reload this page.
1 parent 755b816 commit a720700Copy full SHA for a720700
pkg/github/issues_test.go
@@ -289,9 +289,20 @@ func Test_SearchIssues(t *testing.T) {
289
{
290
name: "successful issues search with all parameters",
291
mockedClient: mock.NewMockedHTTPClient(
292
- mock.WithRequestMatch(
+ mock.WithRequestMatchHandler(
293
mock.GetSearchIssues,
294
- mockSearchResult,
+ expectQueryParams(
295
+ t,
296
+ map[string]string{
297
+ "q": "repo:owner/repo is:issue is:open",
298
+ "sort": "created",
299
+ "order": "desc",
300
+ "page": "1",
301
+ "per_page": "30",
302
+ },
303
+ ).andThen(
304
+ mockResponse(t, http.StatusOK, mockSearchResult),
305
+ ),
306
),
307
308
requestArgs: map[string]interface{}{
0 commit comments