From e3f1822cbf1e939864f09e6ab7fbc7645f220ae0 Mon Sep 17 00:00:00 2001 From: Javier Uruen Val Date: Fri, 4 Apr 2025 10:41:51 +0200 Subject: [PATCH] assert request params --- pkg/github/code_scanning_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/github/code_scanning_test.go b/pkg/github/code_scanning_test.go index 6263a7f0..9dd30137 100644 --- a/pkg/github/code_scanning_test.go +++ b/pkg/github/code_scanning_test.go @@ -156,9 +156,15 @@ func Test_ListCodeScanningAlerts(t *testing.T) { { name: "successful alerts listing", mockedClient: mock.NewMockedHTTPClient( - mock.WithRequestMatch( + mock.WithRequestMatchHandler( mock.GetReposCodeScanningAlertsByOwnerByRepo, - mockAlerts, + expectQueryParams(t, map[string]string{ + "ref": "main", + "state": "open", + "severity": "high", + }).andThen( + mockResponse(t, http.StatusOK, mockAlerts), + ), ), ), requestArgs: map[string]interface{}{