From 8321773a228175b6a95cb57b4626d39cdc6d2e3d Mon Sep 17 00:00:00 2001 From: Andrew Keesler Date: Thu, 12 Nov 2020 12:24:40 -0500 Subject: [PATCH] auth_handler.go: fix lint error Signed-off-by: Andrew Keesler --- internal/oidc/auth/auth_handler_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/oidc/auth/auth_handler_test.go b/internal/oidc/auth/auth_handler_test.go index fe38f2abf..2a38a221f 100644 --- a/internal/oidc/auth/auth_handler_test.go +++ b/internal/oidc/auth/auth_handler_test.go @@ -637,12 +637,13 @@ func TestAuthorizationEndpoint(t *testing.T) { require.Empty(t, rsp.Header().Values("Location")) } - if test.wantBodyJSON != "" { + switch { + case test.wantBodyJSON != "": require.JSONEq(t, test.wantBodyJSON, rsp.Body.String()) - } else if test.wantBodyStringWithLocationInHref { + case test.wantBodyStringWithLocationInHref: anchorTagWithLocationHref := fmt.Sprintf("Found.\n\n", html.EscapeString(actualLocation)) require.Equal(t, anchorTagWithLocationHref, rsp.Body.String()) - } else { + default: require.Equal(t, test.wantBodyString, rsp.Body.String()) }