Skip to content

Commit a720700

Browse files
committed
Test issue search query params
1 parent 755b816 commit a720700

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

pkg/github/issues_test.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,20 @@ func Test_SearchIssues(t *testing.T) {
289289
{
290290
name: "successful issues search with all parameters",
291291
mockedClient: mock.NewMockedHTTPClient(
292-
mock.WithRequestMatch(
292+
mock.WithRequestMatchHandler(
293293
mock.GetSearchIssues,
294-
mockSearchResult,
294+
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+
),
295306
),
296307
),
297308
requestArgs: map[string]interface{}{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy