Skip to content

Commit eac7899

Browse files
test updates based on underlying lib requirements
1 parent ab3cb9f commit eac7899

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/github/projects_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,8 @@ func Test_ListProjectItems(t *testing.T) {
653653
mock.EndpointPattern{Pattern: "/orgs/{org}/projectsV2/{project}/items", Method: http.MethodGet},
654654
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
655655
q := r.URL.Query()
656-
fieldParams := q["fields"]
657-
if len(fieldParams) == 3 && fieldParams[0] == "123" && fieldParams[1] == "456" && fieldParams[2] == "789" {
656+
fieldParams := q.Get("fields")
657+
if fieldParams == "123,456,789" {
658658
w.WriteHeader(http.StatusOK)
659659
_, _ = w.Write(mock.MustMarshal(orgItems))
660660
return
@@ -852,8 +852,8 @@ func Test_GetProjectItem(t *testing.T) {
852852
mock.EndpointPattern{Pattern: "/orgs/{org}/projectsV2/{project}/items/{item_id}", Method: http.MethodGet},
853853
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
854854
q := r.URL.Query()
855-
fieldParams := q["fields"]
856-
if len(fieldParams) == 2 && fieldParams[0] == "123" && fieldParams[1] == "456" {
855+
fieldParams := q.Get("fields")
856+
if fieldParams == "123,456" {
857857
w.WriteHeader(http.StatusOK)
858858
_, _ = w.Write(mock.MustMarshal(orgItem))
859859
return

0 commit comments

Comments
 (0)