auth_handler.go: fix lint error

Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
Andrew Keesler 2020-11-12 12:24:40 -05:00
parent 3a943a3b9a
commit 8321773a22
No known key found for this signature in database
GPG Key ID: 27CE0444346F9413
1 changed files with 4 additions and 3 deletions

View File

@ -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("<a href=\"%s\">Found</a>.\n\n", html.EscapeString(actualLocation))
require.Equal(t, anchorTagWithLocationHref, rsp.Body.String())
} else {
default:
require.Equal(t, test.wantBodyString, rsp.Body.String())
}