From abda3d73b709b3be3952a79576c706093a163ae4 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 17 Feb 2023 16:33:24 +0100 Subject: HTTP: Fix test for joining path by removing trailing slash --- internal/http/http_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/http/http_test.go b/internal/http/http_test.go index 371b4a8..49df931 100644 --- a/internal/http/http_test.go +++ b/internal/http/http_test.go @@ -43,11 +43,11 @@ func Test_JoinURLPath(t *testing.T) { p string want string }{ - {u: "https://example.com", p: "test", want: "https://example.com/test/"}, - {u: "https://example.com", p: "/test", want: "https://example.com/test/"}, - {u: "https://example.com", p: "../test", want: "https://example.com/test/"}, - {u: "https://example.com", p: "../test/", want: "https://example.com/test/"}, - {u: "https://example.com", p: "test/", want: "https://example.com/test/"}, + {u: "https://example.com", p: "test", want: "https://example.com/test"}, + {u: "https://example.com", p: "/test", want: "https://example.com/test"}, + {u: "https://example.com", p: "../test", want: "https://example.com/test"}, + {u: "https://example.com", p: "../test/", want: "https://example.com/test"}, + {u: "https://example.com", p: "test/", want: "https://example.com/test"}, } for _, c := range cases { got, err := JoinURLPath(c.u, c.p) -- cgit v1.2.3