Skip to content

Commit e267a3c

Browse files
authored
assert request params (#94)
1 parent 9e2b1f0 commit e267a3c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkg/github/code_scanning_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,15 @@ func Test_ListCodeScanningAlerts(t *testing.T) {
156156
{
157157
name: "successful alerts listing",
158158
mockedClient: mock.NewMockedHTTPClient(
159-
mock.WithRequestMatch(
159+
mock.WithRequestMatchHandler(
160160
mock.GetReposCodeScanningAlertsByOwnerByRepo,
161-
mockAlerts,
161+
expectQueryParams(t, map[string]string{
162+
"ref": "main",
163+
"state": "open",
164+
"severity": "high",
165+
}).andThen(
166+
mockResponse(t, http.StatusOK, mockAlerts),
167+
),
162168
),
163169
),
164170
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