diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-17 16:33:24 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-17 16:33:24 +0100 |
| commit | abda3d73b709b3be3952a79576c706093a163ae4 (patch) | |
| tree | 0cd69688bed64fd23cae00affcc7690e4e594b80 /internal/http/http_test.go | |
| parent | cdd4a721cc891b8210267eb70a392e10e86ab706 (diff) | |
HTTP: Fix test for joining path by removing trailing slash
Diffstat (limited to 'internal/http/http_test.go')
| -rw-r--r-- | internal/http/http_test.go | 10 |
1 files 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) |
