From 409cd9c388976b4025bb929684d8fb034eb9ef52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ram=C3=ADrez?= Date: Tue, 5 Oct 2021 18:49:41 +0000 Subject: [PATCH] Fixing Has() issue due to go version --- internal/codespaces/api/api_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/codespaces/api/api_test.go b/internal/codespaces/api/api_test.go index 6b9beeba9..449849814 100644 --- a/internal/codespaces/api/api_test.go +++ b/internal/codespaces/api/api_test.go @@ -28,13 +28,13 @@ func TestListCodespaces(t *testing.T) { } page := 1 - if r.URL.Query().Has("page") { - page, _ = strconv.Atoi(r.URL.Query()["page"][0]) + if r.URL.Query().Get("page") != "" { + page, _ = strconv.Atoi(r.URL.Query().Get("page")) } per_page := 0 - if r.URL.Query().Has("per_page") { - per_page, _ = strconv.Atoi(r.URL.Query()["per_page"][0]) + if r.URL.Query().Get("per_page") != "" { + per_page, _ = strconv.Atoi(r.URL.Query().Get("per_page")) } codespaces := []*Codespace{}