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

+8-2
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)