From 7e0eff504d7105b635641b8554b83c75d2f66739 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 2 May 2023 10:44:26 +0200 Subject: API Test: Add test for invalid authorization endpoint scheme --- internal/server/api/api_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/server') diff --git a/internal/server/api/api_test.go b/internal/server/api/api_test.go index 2e19d47..2fea4c6 100644 --- a/internal/server/api/api_test.go +++ b/internal/server/api/api_test.go @@ -100,6 +100,14 @@ func Test_APIGetEndpoints(t *testing.T) { }, err: errors.New("API scheme: 'https', is not equal to token scheme: 'ftp'"), }, + { + epl: endpoints.List{ + API: "https://example.com/1", + Authorization: "ftp://example.com/2", + Token: "https://example.com/3", + }, + err: errors.New("API scheme: 'https', is not equal to authorization scheme: 'ftp'"), + }, } for _, tc := range testCases { -- cgit v1.2.3